feat(pipeline): send encoded v0.4 trace payloads - #204
Draft
BridgeAR wants to merge 7 commits into
Draft
Conversation
Callers that already own an encoded v0.4 payload can now keep it intact through the default exporter instead of rebuilding native span objects. Native stats still decode for aggregation, and v0.5/OTLP still decode in libdatadog for transformation. Both trace-send APIs share the same re-entrancy and response contract.
Direct intake must apply the same obfuscation configuration in WASM as native libdatadog. Resolve it through the environment capability before the one-shot exporter build so invalid replacement rules fail before trace export.
Overall package sizeSelf size: 30.7 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------|🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Consumers need to reject older pipeline packages before loading their addon, because loading it can change runtime loader state even when export later falls back.
The updated libdatadog encoder keeps normalized protobuf spans through JSON serialization instead of rebuilding v0.4 map containers. A 5,000-span Express-shaped batch dropped from 7.05 ms to 5.59 ms (-20.7%) in the middle-five mean of seven release-mode trials. A fresh process reproduced 7.09 ms to 5.56 ms (-21.7%).
Agentless export computes top-level markers before obfuscation. The pinned libdatadog revision removes per-span service clones, reducing the 5,000 one-span top-level phase from 0.71-0.83 ms to 0.44-0.56 ms in release runs.
The /api/v2/spans contract uses whole seconds, but the prior libdatadog revision emitted trace nanoseconds.
Pre-2000 starts enter libdatadog's correction branch, where the prior revision called an unsupported standard clock and trapped in WASM.
|
🔄 Datadog auto-retried 5 jobs - 4 passed on retry 🔗 Commit SHA: a0b1d50 | Docs | View more details | Give us feedback! |
Aaalibaba42
approved these changes
Aug 27, 2026
| { | ||
| let mut stats_collector = self.stats_collector.borrow_mut(); | ||
| if let Some(collector) = stats_collector.as_mut() { | ||
| let (chunks, _) = libdd_trace_utils::msgpack_decoder::v04::from_slice(&data) |
Contributor
There was a problem hiding this comment.
sendEncodedTraces fully msgpack-decodes the payload for stats aggregation, then, when agentless mode is also configured, libdatadog's send_v04_payload_async decodes the same payload a second time internally (since can_forward_v04_payload() returns false whenever agentless is set), doubling deserialization cost per flush.
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.
Callers that already own an encoded v0.4 payload can pass it through the default exporter without rebuilding native span objects. Native stats still decode for aggregation, and v0.5/OTLP still decode in libdatadog for transformation.
Both trace-send APIs share the same re-entrancy and response contract. The pinned libdatadog revision contains the matching exporter fast path.