feat(telemetry)!: make telemetry worker wasm-compatible for the TraceExporter#2172
Conversation
1624706 to
9042d85
Compare
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 19987a1 | Docs | Datadog PR Page | Give us feedback! |
Clippy Allow Annotation ReportTracked Clippy
By file and crateBy file
By crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. Panic-inducing macros in particular should be avoided. In the future, this report may become a PR-blocking quality gate. |
9042d85 to
6743d39
Compare
0d19b82 to
ca34406
Compare
ca34406 to
800823d
Compare
VianneyRuhlmann
left a comment
There was a problem hiding this comment.
The change in shutdown_worker really needs to be discussed further as it can negatively impact shutdown time. Also a lot of comment are very verbose and at wasm specific explanation on public methods doc that shouldn't be cluttered with implementation details.
We can always have the previous native implementation as is in a |
6b0563e to
7846115
Compare
BenchmarksComparisonBenchmark execution time: 2026-07-18 05:31:50 Comparing candidate commit 19987a1 in PR branch Found 2 performance improvements and 0 performance regressions! Performance is the same for 140 metrics, 0 unstable metrics.
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Tests failed on this commit ed87d17:
What to do next?
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
73f23a2
into
main
What?
Port the telemetry stack (
libdd-telemetry,libdd-data-pipeline) to compile and run onwasm32-unknown-unknown.TelemetryWorker,TelemetryWorkerHandle, andTelemetryClientbecome generic over a capability bundleC: HttpClientCapability + SleepCapability; native call sites pin toNativeCapabilities.Why?
Telemetry was previously hard-gated behind
#[cfg(not(target_arch = "wasm32"))]and was a no-op on that target for theTraceExporter.How?
tokio::timecall (sleep, timeout) is replaced by atokio::select!race against<C as SleepCapability>::new().sleep(…), which resolves tosetTimeouton wasm.std::timereplaced byweb-time(Performance.now()/Date.now()on wasm, re-exportsstd::timeon native).tokio::sync::Notify-based async path alongside the existing nativeCondvarsync path.MockClient/file-endpoint logic inhttp_client.rsis deleted and ported toNativeCapabilitiesinlibdd-capabilities-impl.Additional Notes
TelemetryClientBuilder::buildnow returnsResult(was panicking on missing fields) — Rust API break.TelemetryClient::startis now sync viatry_send_msg— Rust API break.typealias pinned toNativeCapabilities.