Skip to content

build(native): update libdatadog to v41.0.0 - #19580

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
codex/otlp-trace-metrics-libdatadog
Aug 13, 2026
Merged

build(native): update libdatadog to v41.0.0#19580
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
codex/otlp-trace-metrics-libdatadog

Conversation

@mabdinur

@mabdinur mabdinur commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Updates ddtrace-py native dependencies without adding OTLP trace-metrics behavior:

  • Upgrades every libdatadog crate from v40.0.0 to v41.0.0 and regenerates Cargo.lock.
  • Updates the GitHub and GitLab system-test revisions to 692e9462ef7296cf1224c0d2bd3a3623a1bfe590 using scripts/update-system-tests-version.py.
  • Extends the Linux OTel thread-context test to cover trace flags added in libdatadog v41.0.0.
  • Updates the OTLP metrics payload test for typed resource attributes emitted by v41.

Testing

  • cargo check --locked --manifest-path src/native/Cargo.toml
  • scripts/lint checks

Risks

This updates the shared native dependency used by tracing, profiling, telemetry, remote configuration, and crash tracking.

Additional Notes

#19672 is stacked on this PR and contains the OTLP trace-metrics feature and release note.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

No remaining files require a CODEOWNERS review.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 7, 2026

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 5 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.contrib.internal.pytorch._distributed -> ddtrace.contrib.internal.pytorch._rank_root -> ddtrace.contrib.internal.pytorch._distributed
ddtrace.contrib.internal.django.patch -> ddtrace.contrib.internal.django.response -> ddtrace.contrib.internal.django.patch
ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

@pr-commenter

pr-commenter Bot commented Aug 7, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-13 17:29:58

Comparing candidate commit 1271bc5 in PR branch codex/otlp-trace-metrics-libdatadog with baseline commit 3a825cc in branch main.

Found 0 performance improvements and 8 performance regressions! Performance is the same for 614 metrics, 9 unstable metrics.

scenario:httppropagationextract-datadog_tracecontext_tracestate_not_propagated_on_trace_id_no_match

  • 🟥 execution_time [+4.873µs; +5.245µs] or [+7.241%; +7.793%]

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+2.407µs; +2.594µs] or [+11.342%; +12.224%]

scenario:iastaspects-lower_aspect

  • 🟥 execution_time [+30.828µs; +37.681µs] or [+13.195%; +16.128%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+74.301µs; +80.091µs] or [+18.017%; +19.420%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+11.977µs; +14.183µs] or [+8.751%; +10.363%]

scenario:span-start

  • 🟥 execution_time [+1.433ms; +1.616ms] or [+8.981%; +10.125%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+252.097ns; +302.023ns] or [+9.362%; +11.216%]

scenario:tracer-small

  • 🟥 execution_time [+32.718µs; +35.042µs] or [+9.381%; +10.047%]

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 10, 2026

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 256 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 256 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=134)
ddtrace.llmobs._integrations.openai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=132)
ddtrace.llmobs._evaluators.runner -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=132)
ddtrace.llmobs._integrations.base -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=132)
ddtrace.debugging._signal.model -×-> ddtrace.trace  (product:debugging -> product:tracing, score=132)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@mabdinur mabdinur changed the title feat(otel): add OTLP trace metrics via libdatadog feat(tracing): export OTLP trace metrics with libdatadog Aug 10, 2026
@mabdinur mabdinur changed the title feat(tracing): export OTLP trace metrics with libdatadog build(native): update libdatadog to v41.0.0 Aug 13, 2026
@mabdinur mabdinur added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 13, 2026
@mabdinur
mabdinur marked this pull request as ready for review August 13, 2026 13:56
@mabdinur
mabdinur requested review from a team as code owners August 13, 2026 13:56
@florentinl

Copy link
Copy Markdown
Contributor

LGTM for otel thread context changes. Thank you for adding the test.

Update system-test revisions and adapt OTel thread-context and metric resource tests for libdatadog v41.0.0.
@mabdinur
mabdinur force-pushed the codex/otlp-trace-metrics-libdatadog branch from cac4a78 to 65a8ed9 Compare August 13, 2026 14:24
@mabdinur
mabdinur requested a review from a team as a code owner August 13, 2026 17:00
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit bae2f50 into main Aug 13, 2026
1277 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the codex/otlp-trace-metrics-libdatadog branch August 13, 2026 18:22
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Aug 18, 2026
## Description

Wires ddtrace-py configuration into the libdatadog v41 OTLP trace-metrics exporter:

- Passes supported `DD_TAGS` entries to the metrics resource as `datadog.tracer_tags`, excluding reserved service, environment, version, and runtime ID keys.
- Adds `DD_TRACE_STATS_ADDITIONAL_TAGS` and forwards the selected span-tag keys to native stats aggregation.
- Exposes both settings through the PyO3 builder and Python type stubs.
- Adds writer and OTLP payload coverage plus a customer-facing feature release note.

This follows the contract introduced in [system-tests#7363](DataDog/system-tests#7363) and refined in [system-tests#7466](DataDog/system-tests#7466).

## Testing

- `cargo check --locked --manifest-path src/native/Cargo.toml`
- `scripts/lint checks`
- Coverage in `tests/tracer/test_writer.py` and `tests/opentelemetry/test_otlp_trace.py`

## Risks

The new export path is disabled unless `OTEL_TRACES_SPAN_METRICS_ENABLED=true`.

## Additional Notes

Stacked on [#19580](#19580), which updates libdatadog to v41.0.0 and must merge first.


Co-authored-by: munir.abdinur <munir.abdinur@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants