Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/telemetry: revamp #2996

Merged
merged 73 commits into from
Feb 19, 2025
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
7d9896d
setup internal/newtelemetry
eliottness Oct 18, 2024
f398276
setup newtelemetry package
eliottness Nov 27, 2024
34d2cf8
internal/newtelemetry: create all structs from schemas
eliottness Jan 13, 2025
f921f60
internal/newtelemetry/internal: created and implemented the Writer
eliottness Jan 15, 2025
160e1fb
end to end support for integration, product, client configuration cha…
eliottness Jan 15, 2025
f43bbdb
refactor config and implement NewClient()
eliottness Jan 15, 2025
a0f0d6b
wip
eliottness Jan 16, 2025
b8de6af
support for payload transformers
eliottness Jan 17, 2025
a9fc7bd
support for more configuration options
eliottness Jan 17, 2025
5159533
fix hostname resolution logic to match the previous telemetry client
eliottness Jan 17, 2025
5e90cb8
test the writer
eliottness Jan 20, 2025
9d9c3b8
support for disabling telemetry
eliottness Jan 20, 2025
72359f5
renamed transformers to mappers and added a heartbeat mapper, removed…
eliottness Jan 20, 2025
9eafa97
start testing the basic features of the client
eliottness Jan 20, 2025
1baad87
add more tests
eliottness Jan 22, 2025
f7e7ff7
add end 2 end tests and body unmarshaling for testing purposes
eliottness Jan 22, 2025
2b2e13b
add actionQueue for calls because NewClient() is done
eliottness Jan 23, 2025
70adebc
fix app-extended-heartbeat payload way of being sent each 24 hours
eliottness Jan 24, 2025
f52047b
support for app-dependencies-loaded payload
eliottness Jan 24, 2025
5f5b7ba
setup logging and the recorder for metrics. Change the api to remove …
eliottness Jan 27, 2025
712971b
tested logs API and added benchmarks for it
eliottness Jan 27, 2025
214c2a7
use internal.RecordWriter instead of the testWriter
eliottness Jan 28, 2025
f847631
refactor the writer and flush method to record more data that will th…
eliottness Jan 28, 2025
3ebfb63
added replay feature to the metrics function of the global client
eliottness Jan 28, 2025
f9dd56c
add internal package for known metrics from the backend
eliottness Jan 28, 2025
4cd8b71
rename metrics package to knownmetrics + added a new TypedSyncMap wra…
eliottness Jan 28, 2025
7487c90
moved the Origin type and Namespace type to the transport package, re…
eliottness Jan 28, 2025
651e8f6
support for distributions metrics
eliottness Jan 29, 2025
44eb960
add tests and fix issues with distributions
eliottness Jan 29, 2025
05b010c
reworked knownmetrics to include namespace and metric kind and added …
eliottness Jan 29, 2025
2cfb429
remove new dependencies that were introduced inadvertently
eliottness Jan 29, 2025
5380ba3
renamed several things added send failure tests and reworked the ring…
eliottness Jan 30, 2025
f654610
added mock telemetry client
eliottness Jan 30, 2025
21d0f01
add GlobalClient() function to mirror old package variable GlobalClient
eliottness Jan 30, 2025
29fc678
rename AddAppConfig to RegisterAppConfig and rename AddBulkConfig to …
eliottness Jan 30, 2025
c7e4928
support config sanitizing and rename some stuff to facilitate the tra…
eliottness Jan 30, 2025
6ba3e84
switch tags from map[string]string to []string
eliottness Jan 30, 2025
9cf1102
fix misc
eliottness Jan 30, 2025
cfe990a
rework telemetrytest to divide the mock client and the recorder client
eliottness Jan 31, 2025
091c522
rework logger to work without sync.Map.Clear() from go 1.23
eliottness Jan 31, 2025
8bc28bc
remove data race from telemetry metrics hot pointer
eliottness Jan 31, 2025
681eae1
flush app-started on StartApp()
eliottness Jan 31, 2025
cd86428
add new benchmarks to benchmarking platform
eliottness Feb 3, 2025
373e2fd
apply @RomainMuller suggestions
eliottness Feb 3, 2025
09cab87
fix bug found with the system-tests
eliottness Feb 3, 2025
352d7a5
increase retro compat with all sanitization config value code
eliottness Feb 4, 2025
e849e5e
starting to apply @RomainMuller suggestions
eliottness Feb 5, 2025
4798807
rework metrics
eliottness Feb 5, 2025
ecf313b
Merge branch 'main' into eliott.bouhana/newtelemetry
eliottness Feb 5, 2025
4fd7f2c
new metric implementation using atomic.Pointer and sync.Pool
eliottness Feb 6, 2025
a6a0bdb
removed mapper.wrapper type
eliottness Feb 6, 2025
c4080ec
simplify knownmetrics generator
eliottness Feb 6, 2025
0759137
added a new TypedSyncPool for use in the RingQueue to aggregate usage…
eliottness Feb 6, 2025
a5b0d0c
apply last suggestions from @RomainMuller
eliottness Feb 6, 2025
a62953e
Merge branch 'main' into eliott.bouhana/newtelemetry
eliottness Feb 6, 2025
90c9985
Merge branch 'main' into eliott.bouhana/newtelemetry
eliottness Feb 7, 2025
3dd727b
fix issue where reducing the value of DD_TELEMETRY_HEARTBEAT_INTERVAL…
eliottness Feb 7, 2025
ba29163
add debug logs and don't make env and version mandatory parameters
eliottness Feb 10, 2025
e27abda
fix lint error that showed up from nothing
eliottness Feb 10, 2025
c4440c3
log when heartbeat is at custom interval
eliottness Feb 10, 2025
300a2b9
stop using for range in ticker.C
eliottness Feb 10, 2025
45c8ba4
fix heartbeat flakyness
eliottness Feb 10, 2025
146966b
fix last issues mentioned by @RomainMuller
eliottness Feb 10, 2025
04e09de
Merge branch 'main' into eliott.bouhana/newtelemetry
eliottness Feb 10, 2025
5dc48d5
Create README.md
eliottness Feb 12, 2025
cafcff7
add more documentation
eliottness Feb 17, 2025
8f35090
don't put back the buffer into the pool if we did not even use 1/8 of…
eliottness Feb 17, 2025
623efa3
newtelemetry/internal: fix deadlock when (*RingQueue).Enqueue is call…
eliottness Feb 18, 2025
78bdf27
newtelemetry/internal: fix doc comments
eliottness Feb 18, 2025
97424bd
newtelemetry/internal: fix cpu leak in the ticker + stop logging issu…
eliottness Feb 18, 2025
69c6107
newtelemetry/internal: reduce flakyness in case the cpu is slow enoug…
eliottness Feb 18, 2025
13603c0
Merge branch 'main' into eliott.bouhana/newtelemetry
eliottness Feb 19, 2025
acb5b49
Merge branch 'main' into eliott.bouhana/newtelemetry
eliottness Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
flush app-started on StartApp()
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
  • Loading branch information
eliottness committed Jan 31, 2025
commit 681eae1a493fbedf42eea5f644ad0e7ea56a4b18
4 changes: 4 additions & 0 deletions internal/newtelemetry/globalclient.go
Original file line number Diff line number Diff line change
@@ -45,6 +45,10 @@ func StartApp(client Client) {
globalClientRecorder.Replay(client)

client.AppStart()

go func() {
client.Flush()
}()
}

// SwapClient swaps the global client with the given client and Flush the old (*client).
Loading