feat(data-pipeline): support ddtrace-py OTLP trace metrics - #2316
feat(data-pipeline): support ddtrace-py OTLP trace metrics#2316mabdinur wants to merge 15 commits into
Conversation
Fixes several OTLP Span Metrics Connector attribute conventions on the
`traces.span.sdk.metrics.duration` histogram export:
- process_tags/peer_tags: emit as a single `datadog.{process,peer}_tags`
arrayValue instead of fanning out per-key attributes.
- is_trace_root: rename `_datadog.is_trace_root` to `datadog.is_trace_root`
and always emit true/false rather than only when true.
- span.kind: canonicalize to the OTel SMC uppercase convention
(e.g. `SPAN_KIND_SERVER`) instead of the raw Datadog tag value.
- status.code: emit the SMC string convention (`STATUS_CODE_OK`/
`STATUS_CODE_ERROR`) unconditionally on every data point, replacing the
int enum that was only set on error.
Companion system-tests spec: DataDog/system-tests#7363
📚 Documentation Check Results📦
|
🔒 Cargo Deny Results📦
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 5961433 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2026-08-10 21:22:24 Comparing candidate commit 5961433 in PR branch Found 1 performance improvements and 3 performance regressions! Performance is the same for 71 metrics, 10 unstable metrics.
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
Always emit available Datadog attributes for OTLP trace metrics and map non-empty service_source values to datadog.svc_src. BREAKING CHANGE: OtlpMetricsConfig and map_stats_to_otlp_metrics no longer accept the OTel trace-semantics setting.
Retain the OTel semantics field and mapper argument for downstream callers while keeping OTLP trace-metrics output unconditional.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78ce6ff5a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What does this PR do?
Adds the libdatadog OTLP trace-metrics support used by ddtrace-py.
Motivation
ddtrace-py needs the shared exporter to implement the contract defined in system-tests#7363 and refined in system-tests#7466.
Additional Notes
Includes a release note announcing ddtrace-py support.
How to test the change?
Rust formatting,
cargo check, Clippy, data-pipeline tests, trace-utils tests, and ddtrace-py OTLP system tests passed.