Documentation
¶
Overview ¶
Package ot implements the ot-tracer-* propagator used by the default Tracer implementation from the OpenTracing project.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SemVersion
deprecated
added in
v0.24.0
Types ¶
type OT ¶
type OT struct{}
OT propagator serializes SpanContext to/from ot-trace-* headers.
Example ¶
package main
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/contrib/propagators/ot"
)
func main() {
otPropagator := ot.OT{}
// register ot propagator
otel.SetTextMapPropagator(otPropagator)
}
Output:
func (OT) Extract ¶
func (OT) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
Extract extracts a context from the carrier if it contains OT headers.
func (OT) Inject ¶
func (OT) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject injects a context into the carrier as OT headers. NOTE: In order to interop with systems that use the OT header format, trace ids MUST be 64-bits.
Click to show internal directories.
Click to hide internal directories.