Fix OTLP trace-metrics attribute compliance gaps - #12144
Conversation
Brings the traces.span.sdk.metrics.duration OTLP export in line with the RFC's attribute spec: emit datadog.process_tags as one arrayValue resource attribute instead of split per-key attributes, add the missing datadog.is_trace_root data-point attribute, canonicalize span.kind to the OTel Span Metrics Connector's uppercase convention, and emit status.code unconditionally with STATUS_CODE_OK/ERROR values instead of only on error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Corrects a reversed static-import order in OtlpResourceJson.java and reformats a few lines flagged by google-java-format. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
service.name was only emitted on a data point when it differed from the writer's configured default service, which contradicts the RFC's always-present requirement already applied to status.code, span.kind, and is_trace_root. Drop the now-unused defaultService field/param.
The earlier spotless fix collapsed this Javadoc onto one physical line, but the formatter's own target (confirmed from the spotless job trace) keeps the three-line /** ... */ block and only unwraps the content itself onto a single line inside it.
Reuses the existing STRING_ARRAY_ATTRIBUTE visitor plumbing already wired for both proto and JSON collectors. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This reverts commit e47c318.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e47c3183cf
ℹ️ 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.
When process-tag propagation is enabled, a user global tag named datadog.process_tags produces two OTLP resource attributes with the same key: the user string and the new process-tag array. Duplicate OTLP keys have ambiguous consumer behavior, so the generated array must take precedence.
📊 Validated against 10 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit e47c318 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Always emit available Datadog attributes alongside OTel attributes and include datadog.svc_src when the aggregation key carries a service source.
mhlidd
left a comment
There was a problem hiding this comment.
Overall LGTM, just some small comments
Summary
Aligns Java OTLP trace metrics with the cross-tracer contract tracked by system-tests#7466.
service.nameon every data point, canonicalSPAN_KIND_*values, and stringSTATUS_CODE_*values.SPAN_KIND_INTERNAL; never emitsSPAN_KIND_UNSPECIFIED.DD_TRACE_OTEL_SEMANTICS_ENABLED; global parsing, telemetry, and the public config accessor remain unchanged.datadog.*attributes, including native booleans fordatadog.span.top_leveland knowndatadog.is_trace_rootvalues.datadog.svc_srcas a string when service source is present.Map<String, Object>; no wrapper.Validation: