chore(deps): bump dd-trace-rs to datadog-opentelemetry-v0.5.0#144
Conversation
Bumps the datadog-opentelemetry git rev pinned by datadog-agent-config from f51cefc4 (pre-v0.3.0) to 50bfea87 (v0.5.0). Regenerates Cargo.lock and LICENSE-3rdparty.csv accordingly. v0.5.0 adds native B3 (single and multi-header) trace propagation support, which is needed to fix "Unknown trace propagation style: 'b3multi'" errors reported by customers using B3 propagation with the Lambda extension. This is a prerequisite for bumping dd-trace-rs in DataDog/datadog-lambda-extension, whose own direct pin of datadog-opentelemetry must stay in lockstep with this crate's pin (datadog-agent-config re-exports datadog_opentelemetry::configuration:: TracePropagationStyle, so the two pins must resolve to the same revision). Verified: cargo check/clippy/fmt clean across the workspace, datadog-agent-config's 79 unit tests pass, dd-rust-license-tool check passes. Two pre-existing dogstatsd::flusher test failures are unrelated (reproduce identically on unmodified main). JIRA: https://datadoghq.atlassian.net/browse/SLES-2907
There was a problem hiding this comment.
Pull request overview
Updates the datadog-agent-config crate’s pinned datadog-opentelemetry (dd-trace-rs) revision to datadog-opentelemetry-v0.5.0, primarily to enable native B3 (single/multi-header) trace propagation support and regenerate dependency metadata accordingly.
Changes:
- Bump
datadog-opentelemetrygitrevincrates/datadog-agent-config. - Regenerate
Cargo.lockto reflect updated transitive dependency graph. - Regenerate
LICENSE-3rdparty.csvto include newly introduced transitive crates.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| LICENSE-3rdparty.csv | Adds newly introduced transitive crates to third-party license inventory. |
| crates/datadog-agent-config/Cargo.toml | Updates the pinned datadog-opentelemetry git revision to v0.5.0. |
| Cargo.lock | Updates the full resolved dependency graph for the workspace after the bump. |
| serde_json = { version = "1.0", default-features = false, features = ["alloc"] } | ||
| tracing = { version = "0.1", default-features = false } | ||
| datadog-opentelemetry = { git = "https://github.com/DataDog/dd-trace-rs", rev = "f51cefc4ad24bec81b38fb2f36b1ed93f21ae913", default-features = false } | ||
| datadog-opentelemetry = { git = "https://github.com/DataDog/dd-trace-rs", rev = "50bfea8755b75e448a80ac04d53fa7edd414eefe", default-features = false } |
There was a problem hiding this comment.
Good catch. Digging in, libdd-trace-utils and libdd-trace-obfuscation did just bump major versions (8→9, 4→5), so actually collapsing this means either patching in a shared libdatadog rev bump across ~13 pin sites in this workspace, or switching these two crates to the crates.io versions directly — both untested major bumps in code that also handles span obfuscation, and it'd touch dogstatsd/trace-agent/serverless-compat too, not just this crate.
Given that, I checked what it's actually costing us: built the downstream Lambda extension binary before/after this bump (release profile, LTO+strip) — 7,664,816 → 7,665,072 bytes, +256 bytes. LTO strips the unreachable duplicate SDK code since we only touch the propagation module. So there's no real size cost right now to justify the risk.
Leaving it as-is and tracking the version alignment separately so it gets its own test pass instead of riding along here.
DataDog/serverless-components#144 merged as 56779dec9f4c9bcc48abcc9833ca4fa4b9d8d627. Re-pin dogstatsd/datadog-fips/datadog-agent-config to that commit instead of the pre-merge draft SHA, and regenerate Cargo.lock. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…v0.5.0 Bumps datadog-agent-config's libdd-trace-utils/libdd-trace-obfuscation git rev from a820699 (8.0.0/4.0.0) to 85ce322a (9.0.0/5.0.0), matching the exact versions datadog-opentelemetry v0.5.0 already pulls from crates.io. Combined with a [patch.crates-io] on the consuming side (datadog-lambda-extension), this collapses the duplicate compiled copies flagged by Copilot on #144, without switching this crate's dependency declarations away from git pins (unlike an earlier attempt that moved to crates.io versions directly - reverted because it broke type identity for downstream consumers that also depend on these crates via a git pin, e.g. bottlecap's ReplaceRule usage). Verified: cargo check/clippy/fmt clean for datadog-agent-config (default + https features), 79/79 tests pass, dd-rust-license-tool check passes. See LIBDATADOG_VERSION_ALIGNMENT.md in datadog-lambda-extension for full context and the chosen approach (Option A: patch + shared rev bump) vs alternatives considered.
….5.0 (#1302) ## Overview Bumps `datadog-opentelemetry` (dd-trace-rs) from `f51cefc4` (pre-`v0.3.0`) to `50bfea87` (`datadog-opentelemetry-v0.5.0`), adding `features = ["_unstable_propagation"]` since the `propagation` module bottlecap uses is now feature-gated upstream (was unconditionally public at our old pin). Also bumps `dogstatsd`/`datadog-fips`/`datadog-agent-config` to the `serverless-components` commit that carries the matching dd-trace-rs pin — [DataDog/serverless-components#144](DataDog/serverless-components#144), v0.5.0 adds native B3 (single- and multi-header) trace propagation support, fixing `Failed to parse trace propagation style: Unknown trace propagation style: 'b3multi', ignoring` errors reported by a customer — see [SLES-2907](https://datadoghq.atlassian.net/browse/SLES-2907). ### Code changes required by the bump - `src/config/propagation_wrapper.rs` — implements the new required `PropagationConfig::trace_propagation_behavior_extract` method (hardcoded to `Continue`, matching prior implicit behavior; bottlecap doesn't expose `DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT`). - `src/traces/propagation/mod.rs` — `DatadogCompositePropagator::extract` now returns `ExtractResult` instead of `Option<SpanContext>`; adapted the wrapper to match on it (`Continue(ctx) -> Some(ctx)`, everything else -> `None`, preserving current behavior). - `src/lifecycle/invocation/triggers/step_function_event.rs` — the `datadog_opentelemetry::constants` re-export was removed upstream (moved to `libdd-sampling` internally); hardcoded the one test-only usage of `SAMPLING_DECISION_MAKER_TAG_KEY` (`"_dd.p.dm"`) rather than adding a new dependency for it. ## Testing - `cargo check --all-targets` — clean - `cargo clippy --all-targets -- -D warnings` — clean - `cargo fmt --all -- --check` — clean - `cargo test --lib` — 530/530 pass - `dd-rust-license-tool check` — passes - `cargo tree --duplicates` — no new `datadog-opentelemetry`/`tonic`/`prost` duplication; `opentelemetry`/`opentelemetry_sdk`/`-semantic-conventions` do pick up a new duplicate version (0.31 direct vs. 0.32 via dd-trace-rs) — non-blocking, binary-size-only, bottlecap never shares those types across the `datadog_opentelemetry` boundary - `--features fips` hits a pre-existing local-macOS-only dylib loading issue in `libddwaf-sys`, confirmed identical on unmodified `main` (needs Linux/CI, unrelated to this change) [SLES-2907]: https://datadoghq.atlassian.net/browse/SLES-2907?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Dependency graph: <img width="3136" height="1336" alt="mermaid-diagram-1783968869812" src="https://github.com/user-attachments/assets/da389d30-1808-4bbf-aa1a-392d229ec828" /> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
…v0.5.0 (#145) Bumps datadog-agent-config's libdd-trace-utils/libdd-trace-obfuscation git rev from a820699 (8.0.0/4.0.0) to 85ce322a (9.0.0/5.0.0), matching the exact versions datadog-opentelemetry v0.5.0 already pulls from crates.io. Combined with a [patch.crates-io] on the consuming side (datadog-lambda-extension), this collapses the duplicate compiled copies flagged by Copilot on #144, without switching this crate's dependency declarations away from git pins (unlike an earlier attempt that moved to crates.io versions directly - reverted because it broke type identity for downstream consumers that also depend on these crates via a git pin, e.g. bottlecap's ReplaceRule usage). Verified: cargo check/clippy/fmt clean for datadog-agent-config (default + https features), 79/79 tests pass, dd-rust-license-tool check passes. See LIBDATADOG_VERSION_ALIGNMENT.md in datadog-lambda-extension for full context and the chosen approach (Option A: patch + shared rev bump) vs alternatives considered.
…1303) ## Overview Follows up on the `dd-trace-rs` v0.5.0 bump ([#1302](#1302)): bumps the shared `libdatadog` git rev (`libdd-capabilities`, `libdd-common`, `libdd-trace-protobuf`, `libdd-trace-utils`, `libdd-trace-normalization`, `libdd-trace-obfuscation`, `libdd-trace-stats`) from `a820699` to `85ce322a`, matching the exact versions `datadog-opentelemetry` v0.5.0 pulls from crates.io. Adds a `[patch.crates-io]` block redirecting those (and the other transitively-pulled `libdd-*` crates) to the same rev, collapsing what would otherwise be two compiled copies of each. This addresses the duplication [Copilot flagged on serverless-components#144](DataDog/serverless-components#144 (comment)) — see `bottlecap/LIBDATADOG_VERSION_ALIGNMENT.md` for the full writeup of options considered and why this one (patch + shared rev bump) was chosen over switching to crates.io versions directly (tried first, reverted — broke type identity for `ReplaceRule`/`Endpoint`/`Span`/etc. across the git-vs-registry boundary throughout the trace pipeline) or leaving the duplication as-is. ### Why not just add this to #1302? #1302 skipped this on purpose. The duplication only cost +256 bytes on the release binary (LTO strips the unreachable copy), while actually fixing it means an untested major-version bump across six libdatadog crates, including `libdd-trace-obfuscation` — the code that redacts sensitive data from spans. Not something to risk on the same PR as an urgent customer fix (SLES-2907, B3 propagation errors). This PR does that bump on its own, with its own tests. **Depends on [DataDog/serverless-components#145](DataDog/serverless-components#145 (which itself builds on #144, still draft) — the `dogstatsd`/`datadog-fips`/`datadog-agent-config` rev pin here must stay in sync with whatever commit that PR lands at. Opened as draft for that reason. JIRA: [SLES-2907](https://datadoghq.atlassian.net/browse/SLES-2907) ### Code changes at the new rev Most of the API changes in `SpanConcentrator` are just things the compiler forces on you, with no behavior change: - `new()` gained an obfuscation-config param. We pass `None` — bottlecap has never done client-side stats obfuscation. - `flush()` now returns `FlushResult { obfuscated_buckets, unobfuscated_buckets }` instead of a flat `Vec`. We concatenate both — obfuscation is off, so everything ends up in `unobfuscated_buckets` anyway. - `pb::TracerPayload` gained `container_debug`, `pb::ClientGroupedStats` gained `additional_metric_tags`. Added the missing fields to 3 struct literals so things compile; both are left at their defaults. `SpanConcentrator::new` also gained a cardinality-override param — the new rev defaults to capping trace-stats aggregation at 7,000 distinct keys per 10-second bucket, added in [DataDog/libdatadog#2158](DataDog/libdatadog#2158) to bound `SpanConcentrator`'s own memory use ([#2158](DataDog/libdatadog#2158) has the math: ~45.6 MB typical, ~700 MB worst case across 3 buckets with the limit on). This is an APM/trace-stats decision, unrelated to Datadog's custom-metrics cardinality limits. The scope of this PR is dependency consolidation, not adopting a new safety feature, so we pass `Some(usize::MAX)` to keep this rev bump behavior-neutral: no Lambda workload will ever produce `usize::MAX` distinct keys in a 10-second window, so stats collapsing never triggers, matching pre-bump behavior exactly. Passing `None` instead would opt into new behavior (collapsing above 7,000 keys into a generic `tracer_blocked_value` bucket for workloads that never hit that before) — worth considering on its own merits given Lambda's memory constraints, but that's a deliberate product/safety decision that deserves its own PR and review, not something to fold into a dependency bump. `test_no_cardinality_limit_applied` covers the unbounded behavior we're keeping. ## Testing - `cargo build --all-targets` — clean - `cargo test --all-targets` — 548/548 pass across all test binaries - `cargo clippy --all-targets -- -D warnings` — clean - `cargo fmt --all -- --check` — clean - `cargo tree --duplicates | grep ^libdd-` — empty (zero `libdd-*` duplicates) - `dd-rust-license-tool check` — passes - Verified against the real `serverless-components#145` commit (not a local `file://` override used during earlier iteration) [SLES-2907]: https://datadoghq.atlassian.net/browse/SLES-2907?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
What does this PR do?
Bumps the
datadog-opentelemetry(dd-trace-rs) gitrevpinned bydatadog-agent-configfromf51cefc4(pre-v0.3.0) to50bfea87(
datadog-opentelemetry-v0.5.0). RegeneratesCargo.lockandLICENSE-3rdparty.csvaccordingly.Motivation
v0.5.0 adds native B3 (single- and multi-header) trace propagation
support. Without it,
DD_TRACE_PROPAGATION_STYLE=b3multi(andb3)fail to parse with
Unknown trace propagation style: 'b3multi', whichis exactly the error a customer hit — see
SLES-2907.
This is also a prerequisite for bumping dd-trace-rs in
DataDog/datadog-lambda-extension: that repo depends directly ondatadog-opentelemetrytoo, anddatadog-agent-configre-exportsdatadog_opentelemetry::configuration::TracePropagationStyle— soboth pins need to resolve to the same revision, or the Lambda
extension build will end up with two incompatible copies of that type.
This PR lands the
serverless-components-side half first.Additional Notes
libdd-trace-utilsalready had two coexisting versions inCargo.lockbefore this change (one git-pinned directly, one pulledtransitively via
datadog-opentelemetry's crates.io deps) — this PRdoesn't introduce that duplication, just updates the transitive
version (8.0.0 → 9.0.0 pre-existing pattern, no new duplicate
introduced for
datadog-opentelemetryitself, which resolves to asingle entry).
datadog-agent-configonly touchesdatadog_opentelemetry::configuration::TracePropagationStyle, whichremains unconditionally public in v0.5.0, so no new Cargo feature
flag is needed on this crate's dependency declaration.
Describe how to test/QA your changes
cargo check --workspace— cleancargo clippy -p datadog-agent-config --all-targets --all-features— cleancargo fmt --all -- --check— cleancargo test -p datadog-agent-config— 79/79 passcargo test --workspace— 2 pre-existingdogstatsd::flushertestfailures reproduce identically on unmodified
main(unrelated HTTP-mockflakiness, not caused by this change)
dd-rust-license-tool check— passesDownstream PR: DataDog/datadog-lambda-extension#1302