opentelemetry-python-contrib
opentelemetry-python-contrib copied to clipboard
Don't normalize headers with "hyphen -> underscore"
trafficstars
I think this can be considered a breaking change, and I'm not sure how it affects other services, but it fixes the behavior according to the OTel specification.
Changes
- [X] Remove replace
-to_on the HTTP header normalizer. - [X] Update test suite.
- [X] Update documentation.
Details
The current behavior is incorrect according to the HTTP RFCs regarding HTTP headers (because they are just case-insensitive), and the OpenTelemetry specification itself.
The following headers are not the same:
Content-Type: application/json
Content_Type: application/json
But those two, should be treated as same:
Content-Type: application/json
content-type: application/json