feat(telemetry)!: make telemetry worker wasm-compatible for the TraceExporter#2172
Open
Aaalibaba42 wants to merge 1 commit into
Open
feat(telemetry)!: make telemetry worker wasm-compatible for the TraceExporter#2172Aaalibaba42 wants to merge 1 commit into
Aaalibaba42 wants to merge 1 commit into
Conversation
1624706 to
9042d85
Compare
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 6743d39 | Docs | Datadog PR Page | Give us feedback! |
Contributor
📚 Documentation Check Results📦
|
Contributor
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats 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. |
Contributor
🔒 Cargo Deny Results📦
|
9042d85 to
6743d39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.