Skip to content

chore(deps): update datadog-opentelemetry, libdatadog, serverless-components deps - #1366

Merged
shreyamalpani merged 3 commits into
mainfrom
shreya.malpani/update-deps
Sep 9, 2026
Merged

chore(deps): update datadog-opentelemetry, libdatadog, serverless-components deps#1366
shreyamalpani merged 3 commits into
mainfrom
shreya.malpani/update-deps

Conversation

@shreyamalpani

@shreyamalpani shreyamalpani commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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.

@datadog-official

datadog-official Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

DataDog/datadog-lambda-extension | integration-suite: [payload-size] — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/datadog-lambda-extension | e2e-test-status (amd64) — 🔄 Retry may pass, looks flaky

View more details · View in GitLab

Useful? React with 👍 / 👎

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

@shreyamalpani shreyamalpani changed the title update datadog-opentelemetry, libdatadog, serverless-components deps chore(deps): update datadog-opentelemetry, libdatadog, serverless-components deps Sep 9, 2026
@shreyamalpani
shreyamalpani marked this pull request as ready for review September 9, 2026 15:20
Copilot AI lite review requested due to automatic review settings September 9, 2026 15:20
@shreyamalpani
shreyamalpani requested review from a team as code owners September 9, 2026 15:20

Copilot AI left a comment

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.

🟡 Changes recommended

Cargo.toml dependency specs currently allow version drift (caret semantics) and already disagree with the “exactly pinned” intent described in the PR (e.g., libdd-capabilities).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the Datadog Lambda Extension (“bottlecap”) to use crates.io releases for datadog-opentelemetry and the libdd-* stack (instead of pinned git revs) to unify dependency resolution and avoid duplicate libdd-* crate copies, and bumps serverless-components to a compatible rev.

Changes:

  • Switched datadog-opentelemetry and multiple libdd-* dependencies from git revs to crates.io versions.
  • Updated trace sending code for the CompressionStrategy::Zstd { level } API change.
  • Updated stats concentrator construction and HTTP client capability impls to match upstream API changes.
File summaries
File Description
bottlecap/src/traces/trace_processor.rs Updates trace flush compression API usage to new CompressionStrategy type.
bottlecap/src/traces/stats_concentrator_service.rs Adapts SpanConcentrator::new calls for the new obfuscation-config parameter.
bottlecap/src/traces/http_client.rs Adds new_without_connection_pooling() to satisfy updated HttpClientCapability.
bottlecap/Cargo.toml Moves libdatadog/dd-trace-rs deps to crates.io versions; updates serverless-components rev.
bottlecap/Cargo.lock Regenerates lockfile for the dependency source/version changes.
bottlecap/LICENSE-3rdparty.csv Regenerates third-party license inventory after dependency updates.
Review details
  • Files reviewed: 5/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread bottlecap/Cargo.toml
Comment on lines +84 to +91
libdd-capabilities = "3.0.0"
libdd-common = { version = "5.2.0", default-features = false }
libdd-trace-protobuf = "4.0.1"
libdd-trace-utils = { version = "10.1.0", default-features = false, features = ["mini_agent"] }
libdd-trace-normalization = "3.0.1"
libdd-trace-obfuscation = { version = "6.0.0", default-features = false }
libdd-trace-stats = { version = "7.0.0", default-features = false }
datadog-opentelemetry = { version = "0.5.2", default-features = false, features = ["_unstable_propagation"] }

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.

nit: just a minor revision of PR message will fix this.

@shreyamalpani
shreyamalpani merged commit 322681f into main Sep 9, 2026
60 of 63 checks passed
@shreyamalpani
shreyamalpani deleted the shreya.malpani/update-deps branch September 9, 2026 21:35
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.

3 participants