public class AwsXRayPropagator
extends java.lang.Object
implements io.opentelemetry.context.propagation.TextMapPropagator
To register the X-Ray propagator together with default propagator:
OpenTelemetry.setPropagators(
DefaultContextPropagators
.builder()
.addTextMapPropagator(new HttpTraceContext())
.addTextMapPropagator(new AWSXRayPropagator())
.build());
Modifier and Type | Method and Description |
---|---|
<C> io.grpc.Context |
extract(io.grpc.Context context,
C carrier,
io.opentelemetry.context.propagation.TextMapPropagator.Getter<C> getter) |
java.util.List<java.lang.String> |
fields() |
static AwsXRayPropagator |
getInstance() |
<C> void |
inject(io.grpc.Context context,
C carrier,
io.opentelemetry.context.propagation.TextMapPropagator.Setter<C> setter) |
public static AwsXRayPropagator getInstance()
public java.util.List<java.lang.String> fields()
fields
in interface io.opentelemetry.context.propagation.TextMapPropagator
public <C> void inject(io.grpc.Context context, @Nullable C carrier, io.opentelemetry.context.propagation.TextMapPropagator.Setter<C> setter)
inject
in interface io.opentelemetry.context.propagation.TextMapPropagator
public <C> io.grpc.Context extract(io.grpc.Context context, C carrier, io.opentelemetry.context.propagation.TextMapPropagator.Getter<C> getter)
extract
in interface io.opentelemetry.context.propagation.TextMapPropagator