-
Notifications
You must be signed in to change notification settings - Fork 930
feat(b3-propagator)!: implement case-insensitive carrier handling #5859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(b3-propagator)!: implement case-insensitive carrier handling #5859
Conversation
- Add fallback to lowercase header lookup in getHeaderValue - Standardize B3 header constants to proper case format - Improves compatibility with case-varying HTTP implementations
- Add inject test for proper case format validation - Add extract tests for lowercase headers - Add mixed case header extraction test - Add priority test (standard case over lowercase) - Add lowercase debug flag extraction test
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5859 +/- ##
=======================================
Coverage 95.03% 95.03%
=======================================
Files 306 306
Lines 7969 7969
Branches 1611 1612 +1
=======================================
Hits 7573 7573
Misses 396 396
🚀 New features to boost your workflow:
|
+1 for extracting in a case insenstivie way from the carrier, but IIUC that should be done with a corresponding
Can you give an example which setup caused problems for you? |
@pichlermarc I ran into issues when propagating trace context between Native (Android, iOS) and a WebView. In Swift and Java, the OTel B3Propagator implementations define the B3-related constants with camelcase, so they don’t recognize lowercase propagation. |
Which problem is this PR solving?
This PR addresses compatibility issues with B3 propagator carrier handling across different language implementations. While other OTel language implementations use standardized B3 formats, the JavaScript implementation uses lowercase format, causing interoperability issues when traces cross language boundaries or when using non-HTTP transport methods.
Short description of the changes
getHeaderValue
functionType of change
X-B3-*
instead ofx-b3-*
).How Has This Been Tested?
Checklist: