Skip to content

feat(pipeline): send encoded v0.4 trace payloads - #204

Draft
BridgeAR wants to merge 7 commits into
mainfrom
BridgeAR/2026-08-17-bulk-finalized-spans
Draft

feat(pipeline): send encoded v0.4 trace payloads#204
BridgeAR wants to merge 7 commits into
mainfrom
BridgeAR/2026-08-17-bulk-finalized-spans

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

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.

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.
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

Overall package size

Self size: 30.7 MB
Deduped: 30.7 MB
No deduping: 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-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 18, 2026

Copy link
Copy Markdown

Tests

🔄 Datadog auto-retried 5 jobs - 4 passed on retry View in Datadog

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a0b1d50 | Docs | View more details | Give us feedback!

{
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants