Skip to content
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

B3 propagator is not case insensitive #3149

Closed
purkhusid opened this issue Apr 8, 2022 · 3 comments
Closed

B3 propagator is not case insensitive #3149

purkhusid opened this issue Apr 8, 2022 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers

Comments

@purkhusid
Copy link

Bug Report

If you use the B3 propagator with e.g. the Grpc.Core instrumentation then it fails to connect the parent spans to the new server spans because gRPC headers are always lower case.

The issue is that the B3 propagator does not store the headers as lower case and then this line in the Grpc.Core instrumentation does not do case-insensitive comparison: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/f45edd73341c4ae35c417ffb98c23aabbc11081a/src/OpenTelemetry.Instrumentation.GrpcCore/ServerTracingInterceptor.cs#L166

There are two ways to fix this:

  • Fix this in the B3 propagator by also handling lower case variants of the headers
  • Do a case-insensitive comparison in the Grpc.Core instrumentation

I wasn't sure which approach would be favoured here but I can implement the one that sounds good to the maintainers.

@purkhusid purkhusid added the bug Something isn't working label Apr 8, 2022
@notcool11
Copy link
Contributor

eee, this seems like it would be an issue across the board. working on a Jaeger propagator and i've seen some clients encode the header so the : goes to %3A. sounds like i gotta strip the encoding AND do a .ToLower() to make things work. good catch!!

@reyang reyang added help wanted Good for taking. Extra help will be provided by maintainers good first issue Good for newcomers labels Apr 13, 2022
@xyq175com
Copy link

I can work this particular one if no one fix this.

@xyq175com
Copy link

The issue has been fixed, can you close this issue?

@pellared pellared closed this as completed Jul 6, 2022
Yun-Ting pushed a commit to Yun-Ting/opentelemetry-dotnet that referenced this issue Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers
Projects
None yet
5 participants