chore(deps): update datadog-opentelemetry, libdatadog, serverless-components deps - #1366
Conversation
|
There was a problem hiding this comment.
🟡 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-opentelemetryand multiplelibdd-*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.
| 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"] } |
There was a problem hiding this comment.
nit: just a minor revision of PR message will fix this.
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.
datadog-opentelemetry50bfea80.5.2libdd-capabilities72fa8683.0.0libdd-common72fa8685.2.0libdd-trace-protobuf72fa8684.0.1libdd-trace-utils72fa86810.1.0libdd-trace-normalization72fa8683.0.1libdd-trace-obfuscation72fa8686.0.0libdd-trace-stats72fa8687.0.0serverless-componentsdeps9daae403ab0125Motivation
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::Compressionwas renamed/moved. It's nowCompressionStrategyinlibdd_trace_utils::send_with_retry, and its Zstd variant became a struct variant (Zstd { level }instead ofZstd(level)). Updated the one call site in trace_processor.rs; no behavior change.HttpClientCapabilitygainednew_without_connection_pooling. HttpClient now implements it (http_client.rs) by delegating straight tonew_client(), sincecreate_clientalready always disables connection pooling (pool_max_idle_per_host(0)) to avoid stale connections across Lambda freeze/resume. Like the pre-existingnew_client, this constructor is unreachable on our code path — production always builds the client viacreate_client(...)directly.SpanConcentrator::newgained 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