You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
we are injecting a carrier with format HTTPHeadershere
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
Use BridgeTracer from the OpenTracing bridge
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.
The text was updated successfully, but these errors were encountered:
Description
We are migrating our OpenTracing app to OpenTelemetry using the OpenTracing bridge. Unfortunately
tracer.Inject
is failing withErrInvalidCarrier
despite providing a validHTTPHeaders
carrier.The code:
HTTPHeaders
hereHttpgrpcHeadersCarrier
implementsTextMapWriter
as documented onHTTPHeaders
BridgeTracer
tries to cast this carrier into a HTTPHeadersCarrier which is not possibleIs 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'sTextMapCarrier
.I see
Inject
only callsSet
so maybe we can get away with only implementing that function?Environment
Steps To Reproduce
BridgeTracer
from the OpenTracing bridgeHTTPHeaders
that implementsTextMapWriter
but is not of typeHTTPHeadersCarrier
Expected behavior
The
BridgeTracer.Inject
should accept a carrier of typeTextMapWriter
.The text was updated successfully, but these errors were encountered: