fix(data-pipeline): correct OTLP trace-metrics attribute shapes - #2316
fix(data-pipeline): correct OTLP trace-metrics attribute shapes#2316mabdinur wants to merge 3 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: 130a4de | Docs | Datadog PR Page | Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2026-08-06 02:25:54 Comparing candidate commit 130a4de in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 139 metrics, 0 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
|
Summary
Aligns libdatadog OTLP trace metrics with the contract exercised by system-tests#7363.
service.nameand string-valuedstatus.code; canonicalizesspan.kindtoSPAN_KIND_*and defaults it toSPAN_KIND_INTERNAL.datadog.process_tagsas a resource array anddatadog.peer_tagsas a data-point array.datadog.is_trace_root; known true/false values anddatadog.span.top_leveluse OTLPboolValue, while unknown trace-root is omitted.datadog.*and_datadog.*attributes.Validation
Added focused attribute-shape and wire-type coverage. Formatting, clippy, crate checks, and all 160 crate tests pass locally.