const (
// Binary represents SpanContexts as opaque binary data.
//
// For Tracer.Inject(): the carrier must be an `io.Writer`.
//
// For Tracer.Extract(): the carrier must be an `io.Reader`.
Binary BuiltinFormat = iota
calling sc, err := ot.GlobalTracer().Extract(ot.Binary, bytes.NewBuffer(traceData)) always results in ot.ErrInvalidCarrier
The
github.com/opentracing/opentracing-go
says:calling
sc, err := ot.GlobalTracer().Extract(ot.Binary, bytes.NewBuffer(traceData))
always results inot.ErrInvalidCarrier