Skip to content

Fix hexadecimal flag parsing in Jaeger propagator - #8975

Merged
jack-berg merged 2 commits into
open-telemetry:mainfrom
kamikazeayoup:fix/jaeger-hex-flags
Oct 29, 2026
Merged

jack-berg merged 2 commits into
open-telemetry:mainfrom
kamikazeayoup:fix/jaeger-hex-flags

Conversation

@kamikazeayoup

Copy link
Copy Markdown
Contributor

Problem

The Jaeger propagation format (https://www.jaegertracing.io/sdk-migration/#tracespan-identity) defines flags as one or two hexadecimal digits, but the propagator parses them as decimal.

Valid values such as b (sampled, debug, and firehose enabled) fail to parse, causing the incoming trace context to be lost.

Changes

  • Parse flags using base 16.
  • Add a regression test using the Jaeger client’s encoder to verify that flags b produce a valid, sampled remote context.

Validation

The regression test fails without the fix and passes with it.

@kamikazeayoup
kamikazeayoup requested a review from a team as a code owner October 22, 2026 00:18
@opentelemetry-pr-dashboard

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

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-29 21:54 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 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.36%. Comparing base (877820b) to head (5156a79).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8975      +/-   ##
============================================
- Coverage     90.41%   90.36%   -0.06%     
- Complexity    10981    10992      +11     
============================================
  Files          1019     1020       +1     
  Lines         30016    30083      +67     
  Branches       3917     3931      +14     
============================================
+ Hits          27140    27183      +43     
- Misses         1923     1939      +16     
- Partials        953      961       +8     

☔ 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 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find, thanks for fixing. Pushed a small commit to add a few more test cases.

@jack-berg
jack-berg enabled auto-merge (squash) October 29, 2026 21:25
@jack-berg
jack-berg merged commit 9014077 into open-telemetry:main Oct 29, 2026
34 checks passed
@otelbot

otelbot Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

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

@kamikazeayoup
kamikazeayoup deleted the fix/jaeger-hex-flags branch October 29, 2026 22:54
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.

2 participants