Skip to content

[SLES-2907] chore(deps): align libdatadog rev, dedupe libdd-* crates#1303

Draft
litianningdatadog wants to merge 1 commit into
tianning.li/bump-dd-trace-rs-v0.5.0from
tianning.li/bump-dd-trace-rs-v0.5.0-full-update
Draft

[SLES-2907] chore(deps): align libdatadog rev, dedupe libdd-* crates#1303
litianningdatadog wants to merge 1 commit into
tianning.li/bump-dd-trace-rs-v0.5.0from
tianning.li/bump-dd-trace-rs-v0.5.0-full-update

Conversation

@litianningdatadog

@litianningdatadog litianningdatadog commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Overview

Follows up on the dd-trace-rs v0.5.0 bump
(#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
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
(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

Code changes forced by real upstream API changes at the new rev (not duplication artifacts)

  • src/traces/stats_concentrator_service.rs: SpanConcentrator::new gained
    a cardinality-override and an obfuscation-config parameter (both None
    bottlecap doesn't use either); flush() now returns a
    FlushResult{obfuscated_buckets, unobfuscated_buckets} split instead of a
    flat Vec (combined both, since obfuscation is disabled).
  • src/traces/trace_processor.rs, tests/apm_integration_test.rs:
    pb::TracerPayload gained container_debug and pb::ClientGroupedStats
    gained additional_metric_tags; added the missing fields to 3 struct
    literals (2 of which are in the integration test, which fails to compile
    without the change).

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)

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 13, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

DataDog/datadog-lambda-extension | e2e-test-status (amd64)   View in Datadog   GitLab

DataDog/datadog-lambda-extension | e2e-test-status (amd64, fips)   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 08b3996 | Docs | Datadog PR Page | Give us feedback!

@litianningdatadog litianningdatadog changed the base branch from main to tianning.li/bump-dd-trace-rs-v0.5.0 July 13, 2026 20:41
Follows up on the dd-trace-rs v0.5.0 bump: 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 - see 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.

Code changes forced by real upstream API changes at the new rev (not
duplication artifacts):
- src/traces/stats_concentrator_service.rs: SpanConcentrator::new
  gained a cardinality-override and an obfuscation-config parameter
  (both None - bottlecap doesn't use either); flush() now returns a
  FlushResult{obfuscated_buckets, unobfuscated_buckets} split instead
  of a flat Vec (combined both, since obfuscation is disabled).
- src/traces/trace_processor.rs, tests/apm_integration_test.rs:
  pb::TracerPayload gained container_debug and pb::ClientGroupedStats
  gained additional_metric_tags; added the missing fields to 3 struct
  literals (2 in the integration test, which fails to compile without
  the change).

Depends on DataDog/serverless-components#145 (which itself builds on
must stay in sync with whatever commit that PR lands at.

JIRA: https://datadoghq.atlassian.net/browse/SLES-2907

Verified: cargo build/test/clippy/fmt all clean against the real
serverless-components#145 commit (not a local override), 548/548
tests pass across all test binaries, cargo tree --duplicates shows
zero libdd-* duplicates, dd-rust-license-tool check passes.
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.

1 participant