perf(trace-exporter): forward encoded v0.4 payloads - #2362
Conversation
Already-finalized v0.4 payloads otherwise pay for a full decode and serialization before agent transport. Forward them unchanged when no configured consumer needs span objects, and keep the decoded path for stats, filters, alternate formats, log output, agentless, and OTLP.
📚 Documentation Check Results📦
|
🔒 Cargo Deny Results📦
|
|
Direct intake bypasses the Agent normalization and obfuscation, which can send malformed or sensitive span data unchanged. Agentless setup now requires an explicit obfuscation configuration and rejects invalid replacement rules before export.
Embedded runtimes cannot expose host environment variables through std::env, so obfuscation defaults and replacement rules would be absent. The platform-capability constructor uses the native parser and propagates provider or rule errors before export.
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
|
BenchmarksComparisonBenchmark execution time: 2026-08-18 11:00:11 Comparing candidate commit 4e4cf37 in PR branch Found 13 performance improvements and 19 performance regressions! Performance is the same for 108 metrics, 0 unstable metrics.
|
…ulk-finalized-spans
The agentless path rebuilt v0.4 spans after normalization and obfuscation only to serialize them as JSON, allocating a second set of 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%).
Top-level detection cloned every service string and allocated a map even for a single-span trace. On Rust 1.97.1, 200k spans across seven trials (drop best and worst) fell from 30.25 ms to 15.98 ms for one-span traces and 16.87 ms to 10.25 ms for four-span traces; a fresh process reproduced 29.92 to 15.81 ms and 16.90 to 10.18 ms.
The agentless intake contract uses whole Unix seconds, but the native encoder forwarded trace nanoseconds unchanged. This restores wire parity with dd-trace-js while keeping durations in nanoseconds.
Starts before 2000 enter the correction branch. std::time::SystemTime traps on wasm32-unknown-unknown, so agentless export could crash instead of normalizing the span.
Already-finalized v0.4 payloads currently pay for a full decode and serialization before agent transport. This forwards them unchanged when no configured consumer needs span objects.
Stats, trace filters, alternate formats, log output, agentless export, and OTLP keep the decoded path.