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

OpenTracing bridge: BridgeTracer.Inject errors with ErrInvalidCarrier #2137

Open
kvrhdn opened this issue Jul 28, 2021 · 1 comment · May be fixed by #2141
Open

OpenTracing bridge: BridgeTracer.Inject errors with ErrInvalidCarrier #2137

kvrhdn opened this issue Jul 28, 2021 · 1 comment · May be fixed by #2141
Labels
bug Something isn't working help wanted Extra attention is needed pkg:bridges Related to a bridge package
Projects

Comments

@kvrhdn
Copy link
Contributor

kvrhdn commented Jul 28, 2021

Description

We are migrating our OpenTracing app to OpenTelemetry using the OpenTracing bridge. Unfortunately tracer.Inject is failing with ErrInvalidCarrier despite providing a valid HTTPHeaders carrier.

The code:

Is this a known limitation of the OpenTracing bridge?

I'd guess to solve this we'd need some kind of adapter from the OpenTracing TextMapWriter into OTel's TextMapCarrier.
I see Inject only calls Set so maybe we can get away with only implementing that function?

Environment

  • opentelemetry-go version: v1.0.0-RC2
  • github.com/opentracing/opentracing-go: v1.2.0

Steps To Reproduce

  1. Use BridgeTracer from the OpenTracing bridge
  2. Inject a carrier with format HTTPHeaders that implements TextMapWriter but is not of type HTTPHeadersCarrier

Expected behavior

The BridgeTracer.Inject should accept a carrier of type TextMapWriter.

@kvrhdn kvrhdn added the bug Something isn't working label Jul 28, 2021
@bboreham
Copy link
Contributor

I started working on this.

@bboreham bboreham linked a pull request Jul 29, 2021 that will close this issue
@MrAlias MrAlias added this to Needs triage in Bugs via automation Oct 15, 2021
@MrAlias MrAlias moved this from Needs triage to High priority in Bugs Oct 15, 2021
@MrAlias MrAlias added help wanted Extra attention is needed pkg:bridges Related to a bridge package labels May 3, 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 help wanted Extra attention is needed pkg:bridges Related to a bridge package
Projects
Status: High priority
Bugs
  
High priority
Development

Successfully merging a pull request may close this issue.

3 participants