Class W3CTraceContextPropagator
java.lang.Object
io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator
- All Implemented Interfaces:
io.opentelemetry.context.propagation.TextMapPropagator
@Immutable
public final class W3CTraceContextPropagator
extends Object
implements io.opentelemetry.context.propagation.TextMapPropagator
Implementation of the W3C TraceContext propagation protocol. See W3C Trace Context.
This is the default propagator for SpanContext
s. The SpanContext
type is
designed to support all the data propagated via W3C propagation natively.
-
Method Summary
Modifier and TypeMethodDescription<C> io.opentelemetry.context.Context
extract
(io.opentelemetry.context.Context context, C carrier, io.opentelemetry.context.propagation.TextMapGetter<C> getter) fields()
static W3CTraceContextPropagator
Returns a singleton instance of aTextMapPropagator
implementing the W3C TraceContext propagation.<C> void
inject
(io.opentelemetry.context.Context context, C carrier, io.opentelemetry.context.propagation.TextMapSetter<C> setter)
-
Method Details
-
getInstance
Returns a singleton instance of aTextMapPropagator
implementing the W3C TraceContext propagation. -
fields
- Specified by:
fields
in interfaceio.opentelemetry.context.propagation.TextMapPropagator
-
inject
public <C> void inject(io.opentelemetry.context.Context context, @Nullable C carrier, io.opentelemetry.context.propagation.TextMapSetter<C> setter) - Specified by:
inject
in interfaceio.opentelemetry.context.propagation.TextMapPropagator
-
extract
public <C> io.opentelemetry.context.Context extract(io.opentelemetry.context.Context context, @Nullable C carrier, io.opentelemetry.context.propagation.TextMapGetter<C> getter) - Specified by:
extract
in interfaceio.opentelemetry.context.propagation.TextMapPropagator
-