Class BaggageTextMapPropagator
java.lang.Object
io.micrometer.tracing.otel.propagation.BaggageTextMapPropagator
- All Implemented Interfaces:
io.opentelemetry.context.propagation.TextMapPropagator
public class BaggageTextMapPropagator
extends Object
implements io.opentelemetry.context.propagation.TextMapPropagator
TextMapPropagator that adds compatible baggage entries (name of the field means
an HTTP header entry). If existing baggage is present in the context, this will append
entries to the existing one. Preferably this TextMapPropagator should be added
as last.- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBaggageTextMapPropagator(List<String> remoteFields, io.micrometer.tracing.BaggageManager baggageManager) Creates a new instance ofBaggageTextMapPropagator. -
Method Summary
Modifier and TypeMethodDescription<C> io.opentelemetry.context.Contextextract(io.opentelemetry.context.Context context, C c, io.opentelemetry.context.propagation.TextMapGetter<C> getter) fields()<C> voidinject(io.opentelemetry.context.Context context, C c, io.opentelemetry.context.propagation.TextMapSetter<C> setter)
-
Constructor Details
-
BaggageTextMapPropagator
public BaggageTextMapPropagator(List<String> remoteFields, io.micrometer.tracing.BaggageManager baggageManager) Creates a new instance ofBaggageTextMapPropagator.- Parameters:
remoteFields- remote fieldsbaggageManager- baggage manager
-
-
Method Details
-
fields
- Specified by:
fieldsin interfaceio.opentelemetry.context.propagation.TextMapPropagator
-
inject
public <C> void inject(io.opentelemetry.context.Context context, C c, io.opentelemetry.context.propagation.TextMapSetter<C> setter) - Specified by:
injectin interfaceio.opentelemetry.context.propagation.TextMapPropagator
-
extract
public <C> io.opentelemetry.context.Context extract(io.opentelemetry.context.Context context, C c, io.opentelemetry.context.propagation.TextMapGetter<C> getter) - Specified by:
extractin interfaceio.opentelemetry.context.propagation.TextMapPropagator
-