chore(deps): update datadog-opentelemetry and libdatadog dependencies - #163
Merged
shreyamalpani merged 3 commits intoSep 9, 2026
Conversation
shreyamalpani
force-pushed
the
shreya.malpani/update-libdatadog-deps-to-match-datadog-opentelemetry
branch
from
September 4, 2026 17:30
e671c27 to
ed83c14
Compare
`datadog-opentelemetry` 0.5.2 pulls in `libdd-remote-config` and its transitive tail (schemars, serde_with, jiff, chrono, strum, time, darling), so the third-party license list needs regenerating with `dd-rust-license-tool write`. All added entries are permissive. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
shreyamalpani
marked this pull request as ready for review
September 8, 2026 14:59
shreyamalpani
requested review from
DarcyRaynerDD and
Lewis-E
and removed request for
a team
September 8, 2026 14:59
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
It performs a broad dependency source/version migration with a large lockfile change and upstream API adjustments that warrant final human validation of runtime impact.
Pull request overview
This PR updates the workspace to use published crates.io releases for datadog-opentelemetry and the libdatadog (“libdd-*”) crate set, moving off pinned git revisions to reduce duplicate crate copies and align versions with dd-trace-rs’s datadog-opentelemetry v0.5.2 pins.
Changes:
- Bump
datadog-opentelemetryto0.5.2from a git rev. - Switch multiple
libdd-*dependencies from git revs to crates.io versions, centralizing some versions via[workspace.dependencies]. - Adjust
datadog-trace-agentintegration points for upstream API changes (HttpClientCapabilityconstructor addition;SpanConcentrator::newsignature change).
File summaries
| File | Description |
|---|---|
| LICENSE-3rdparty.csv | Updates third-party license inventory for newly-resolved transitive crates. |
| crates/datadog-trace-agent/src/trace_flusher.rs | Refactors ProxyHttpClient construction to support the new HttpClientCapability constructor surface. |
| crates/datadog-trace-agent/src/stats_concentrator_service.rs | Updates SpanConcentrator::new call to pass the new obfuscation-config parameter (None). |
| crates/datadog-trace-agent/Cargo.toml | Replaces libdatadog git deps with crates.io versions; enables stats-obfuscation feature on libdd-trace-stats. |
| crates/datadog-serverless-compat/Cargo.toml | Switches libdd-trace-utils to workspace dependency with https feature. |
| crates/datadog-metrics-collector/Cargo.toml | Switches libdd-common to workspace dependency. |
| crates/datadog-agent-config/Cargo.toml | Bumps datadog-opentelemetry to crates.io and switches libdd deps to workspace dependencies. |
| Cargo.toml | Adds [workspace.dependencies] entries for shared libdd versions (common/trace-utils/trace-obfuscation). |
| Cargo.lock | Updates resolved dependency graph to match crates.io sources and new versions. |
Review details
- Files reviewed: 8/9 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Lewis-E
approved these changes
Sep 8, 2026
shreyamalpani
deleted the
shreya.malpani/update-libdatadog-deps-to-match-datadog-opentelemetry
branch
September 9, 2026 14:36
shreyamalpani
added a commit
to DataDog/datadog-lambda-extension
that referenced
this pull request
Sep 9, 2026
…ponents deps (#1366) ## What does this PR do? Moves the Datadog Lambda Extension's libdatadog and dd-trace-rs dependencies off pinned git revs and onto published crates.io versions, matching exactly what dd-trace-rs's datadog-opentelemetry v0.5.2 pins. Also bumps the serverless-components git rev to pick up its own move to the same versions. | crate | before | after | |---|---|---| | `datadog-opentelemetry` | git rev `50bfea8` | `0.5.2` | | `libdd-capabilities` | git rev `72fa868` | `3.0.0` | | `libdd-common` | git rev `72fa868` | `5.2.0` | | `libdd-trace-protobuf` | git rev `72fa868` | `4.0.1` | | `libdd-trace-utils` | git rev `72fa868` | `10.1.0` | | `libdd-trace-normalization` | git rev `72fa868` | `3.0.1` | | `libdd-trace-obfuscation` | git rev `72fa868` | `6.0.0` | | `libdd-trace-stats` | git rev `72fa868` | `7.0.0` | | `serverless-components` deps | git rev `9daae40` | git rev `3ab0125` | ## Motivation Bottlecap links both serverless-components and datadog-opentelemetry, and datadog-opentelemetry itself depends on several libdd-* crates. Cargo treats a git source as distinct from crates.io and will never unify them, so pinning our own libdd-* deps to git+libdatadog#72fa868 while datadog-opentelemetry pulled the same crates from crates.io resolved as two separate copies of each crate even when the code was identical. Pinning to the same crates.io versions datadog-opentelemetry v0.5.2 resolves to (confirmed via its Cargo.lock) collapses the libdd-* deps to one copy each. This was also done in serverless-components in DataDog/serverless-components#163 to prevent duplicate dependencies. ## Additional Notes Three upstream API breaks came with the bump, all in traces: - `libdd_trace_utils::send_data::Compression` was renamed/moved. It's now `CompressionStrategy` in `libdd_trace_utils::send_with_retry`, and its Zstd variant became a struct variant (`Zstd { level }` instead of `Zstd(level)`). Updated the one call site in trace_processor.rs; no behavior change. - `HttpClientCapability` gained `new_without_connection_pooling`. HttpClient now implements it (http_client.rs) by delegating straight to `new_client()`, since `create_client` already always disables connection pooling (pool_max_idle_per_host(0)) to avoid stale connections across Lambda freeze/resume. Like the pre-existing `new_client`, this constructor is unreachable on our code path — production always builds the client via `create_client(...)` directly. - `SpanConcentrator::new` gained an obfuscation-config argument, gated on libdd-trace-stats/stats-obfuscation. datadog-opentelemetry pulls that feature in via libdd-data-pipeline, so feature unification turns it on for our workspace build even though we don't request it ourselves. We pass None at both call sites in stats_concentrator_service.rs, which resolves to the feature's default (obfuscation disabled at the concentrator level) — the same as before this param existed. Spans are already obfuscated earlier in the pipeline (obfuscate_span in trace_processor.rs) before they reach the concentrator, so this preserves current behavior. None of these three changes alter runtime behavior. The only intended behavior change in this PR is the dependency versions themselves moving forward. ## Describe how to test/QA your changes - cargo build and cargo build --all-features are clean. - cargo clippy --all-targets --features default is clean. - cargo test --lib passes: 650 passed, 0 failed. - cargo tree --duplicates | grep '^libdd-' is empty — zero duplicate libdd-* packages remain. - dd-rust-license-tool write regenerated bottlecap/LICENSE-3rdparty.csv; dd-rust-license-tool check passes.
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 does this PR do?
Updates
datadog-opentelemetryfrom a git rev (50bfea8) to0.5.2on crates.io to align with bumping this dependency in the Lambda Extension.Moves every libdatadog dependency off the pinned git rev (
72fa868) and onto published crates.io versions, matching exactly whatdd-trace-rs'sdatadog-opentelemetryv0.5.2 pins:libdd-trace-utilslibdd-commonlibdd-capabilities/-impllibdd-library-configlibdd-trace-protobuflibdd-trace-statslibdd-trace-obfuscationMotivation
The Datadog Lambda extension links both
serverless-componentsanddatadog-opentelemetry. Cargo treats a git source as distinct from crates.io and will never unify them, sogit+libdatadog#72fa868andcrates.io libdd-common 5.2.0resolved as two separate copies of the same crate even when the code was identical — duplicate symbols, duplicate state, larger binary.Pinning to the same crates.io versions
datadog-opentelemetryuses collapses those to one copy each. Using published versions instead of a rev also means semver signals breakage instead of a rev bump silently changing APIs.Additional Notes
Two upstream API breaks came with the bump:
HttpClientCapabilitygainednew_without_connection_pooling.ProxyHttpClientnow implements it (trace_flusher.rs);with_proxywas refactored intowith_proxy_poolingso the non-pooled variant setspool_max_idle_per_host(0). Like the pre-existingnew_client, this constructor is unreachable on our code path — we only ever hand an already-built instance toSendData::send, and neithersend_datanorsend_with_retryconstructs a capability itself. The comment above the constructors was widened to say so.SpanConcentrator::newgained an obfuscation-config argument, gated onlibdd-trace-stats/stats-obfuscation.datadog-opentelemetrypulls that feature in vialibdd-data-pipeline, so feature unification turns it on for the workspace build; it's now enabled explicitly ondatadog-trace-agentso standalone builds agree. We passNone, which is a no-op: it resolves toenabled: false, soadd_spantakes the sameBorrowedAggregationKey::from_spanpath as the feature-off branch and every bucket flushes intounobfuscated_buckets— the fieldhandle_flushalready read. Spans are obfuscated by the trace processor (obfuscate_spaninChunkProcessor) before they reach the concentrator, so the concentrator's own resource obfuscation staying off preserves current behavior.Neither fix changes runtime behavior. The only intended behavior change in this PR is
datadog-opentelemetryitself moving from July's rev to 0.5.2.Describe how to test/QA your changes
cargo build --workspaceandcargo clippy --workspace --all-targetsare clean.cargo test --workspacepasses, with one exception:test_tracer_disabled_agent_stats_enabled_uses_agent_statsfails, which I confirmed reproduces identically on the base commit — pre-existing and unrelated to this change.Cargo.lockshows exactly one copy of each of the 17 libdd crates and zero remaining git sources (grep -c "libdatadog\|dd-trace-rs" Cargo.lock→ 0).cargo tree -e features:httpsandstats-obfuscationstill resolve everywhere they did before.