Skip to content

Give Prometheus exemplar trace_id and span_id precedence over filtered attributes - #8959

Merged
jack-berg merged 1 commit into
open-telemetry:mainfrom
thswlsqls:fix/prometheus-exemplar-trace-id-precedence
Oct 19, 2026
Merged

jack-berg merged 1 commit into
open-telemetry:mainfrom
thswlsqls:fix/prometheus-exemplar-trace-id-precedence

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Fixes #8958

Description

Testing done

  • Added Otel2PrometheusConverterTest#exemplarSpanContextLabelsTakePrecedence with two cases: trace_id/span_id keys and trace.id/span.id keys.
  • Before the fix both cases fail (expected: "00000000000000000000000000000001" but was: "bogus"); after the fix both pass.
  • ./gradlew :exporters:prometheus:check passed (221 tests, 0 failures, 3 skipped).

@thswlsqls
thswlsqls marked this pull request as ready for review October 18, 2026 13:04
@thswlsqls
thswlsqls requested a review from a team as a code owner October 18, 2026 13:04
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-19 19:14 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.41%. Comparing base (b32298a) to head (2984190).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8959   +/-   ##
=========================================
  Coverage     90.40%   90.41%           
- Complexity    10898    10901    +3     
=========================================
  Files          1015     1015           
  Lines         29843    29842    -1     
  Branches       3896     3896           
=========================================
+ Hits          26981    26982    +1     
  Misses         1910     1910           
+ Partials        952      950    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jack-berg
jack-berg merged commit a055aef into open-telemetry:main Oct 19, 2026
35 checks passed
@otelbot

otelbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution @thswlsqls! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prometheus exporter: exemplar filtered attributes override trace_id and span_id labels

2 participants