fix(otlp): align trace-metrics attributes with the RFC attribute spec - #9685
fix(otlp): align trace-metrics attributes with the RFC attribute spec#9685mabdinur wants to merge 11 commits into
Conversation
Fixes several OTLP trace-metrics (traces.span.sdk.metrics.duration) attribute gaps found in a cross-tracer audit against SEMCON-1093: - datadog.process_tags now emits one array-valued resource attribute (mirroring the legacy v0.6/stats ProcessTags shape) instead of flattening each tag into its own datadog.<key> attribute. - datadog.is_trace_root is now emitted per data point, gated the same way as the other datadog.* attributes. - span.kind is canonicalized to the OTel Span Metrics Connector's SPAN_KIND_* uppercase convention instead of being passed through lowercase. - status.code is now a required string attribute (STATUS_CODE_OK/STATUS_CODE_ERROR) on every data point, replacing the previous OTLP-trace-style int enum that was only set on errors. additional_metric_tags and peer_tags remain unimplemented on this path; both are flagged with a one-line TODO pointing at the corresponding gap (or its absence) in the legacy v0.6/stats exporter.
Overall package sizeSelf size: 7.91 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 441.68 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9685 +/- ##
==========================================
- Coverage 98.52% 94.92% -3.60%
==========================================
Files 957 899 -58
Lines 135106 130030 -5076
Branches 12015 10463 -1552
==========================================
- Hits 133109 123428 -9681
- Misses 1997 6602 +4605 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
service.name was omitted from OTLP trace-metrics data points whenever a span's service matched the default/global service, mirroring the status.code fix earlier in this branch: required attributes must be unconditional, not skipped as an optimization.
BenchmarksBenchmark execution time: 2026-08-06 19:17:03 Comparing candidate commit d5a78d3 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2328 metrics, 30 unstable metrics.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9775eee23
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85f040093a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3065873246
ℹ️ 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".
Summary
Aligns
traces.span.sdk.metrics.durationwith the cross-tracer contract in system-tests#7466.datadog.*attributes; trace-metrics semantics-mode plumbing and suppression branches are removed.SPAN_KIND_*; missing, unknown, and unspecified kinds useSPAN_KIND_INTERNAL._dd.svc_srcin the aggregation key is exported as the string attributedatadog.svc_srcand omitted when absent.additional_metric_tagsanddatadog.peer_tagsremain unsupported on this path and are separate follow-ups.Validation
npm run lint: passing