opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Fix Jaeger propagator baggage header case sensitivity

Open thswlsqls opened this issue 5 months ago • 1 comments

Description

  • JaegerPropagator.getBaggageFromHeader() matched baggage keys case sensitively (uberctx-, jaeger-baggage), so carriers that return header keys in their original case (e.g. undertow 1.7 sends Uberctx-Key, Jaeger-Baggage) had their baggage silently dropped.
  • Lowercase the carrier key with key.toLowerCase(Locale.ROOT) before matching the prefix and header name; the value lookup still uses the original key.
  • Mirrors the sibling OtTracePropagator.extract(), which already lowercases the key (#5840). Jaeger was missed.

Testing done

  • Added JaegerPropagatorTest#extract_baggageOnly_capitalizedHeaders covering both a capitalized Uberctx-* prefix and a capitalized Jaeger-Baggage header.
  • ./gradlew :extensions:trace-propagators:check — 39 tests passed in JaegerPropagatorTest, full module check green.
  • No public API change: private method, jApiCmp produced no apidiff change.
  • Added a ## Unreleased entry in CHANGELOG.md.

thswlsqls avatar Jun 21 '26 00:06 thswlsqls

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 91.60%. Comparing base (bf29609) to head (356dcba). :warning: Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8496   +/-   ##
=========================================
  Coverage     91.59%   91.60%           
  Complexity    10312    10312           
=========================================
  Files          1013     1013           
  Lines         27273    27274    +1     
  Branches       3202     3202           
=========================================
+ Hits          24982    24984    +2     
  Misses         1563     1563           
+ Partials        728      727    -1     

:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jun 21 '26 00:06 codecov[bot]

Ready for review — CI is green.

thswlsqls avatar Jul 05 '26 05:07 thswlsqls

This PR has review comments. Review suggestions, whether from maintainers or automated reviewers, aren't always correct or required. Please evaluate each comment on its merits, then make sure each thread has a clear outcome.

For example, link to the commit if you applied a suggestion, explain why it wasn't applied, or ask a follow-up question.

Automation flags a PR for human review once every review thread has a reply or is marked as resolved.

Status across open PRs is visible on the pull request dashboard.

needs a rebase for the changelog

jkwatson avatar Jul 13 '26 17:07 jkwatson

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.

otelbot[bot] avatar Jul 13 '26 20:07 otelbot[bot]