Class TraceContextCarrierTextMapGetter
java.lang.Object
org.apache.juneau.rest.server.tracing.otel.TraceContextCarrierTextMapGetter
- All Implemented Interfaces:
io.opentelemetry.context.propagation.TextMapGetter<TraceContextCarrier>
public final class TraceContextCarrierTextMapGetter
extends Object
implements io.opentelemetry.context.propagation.TextMapGetter<TraceContextCarrier>
TextMapGetter implementation that reads W3C trace-context fields from a neutral
TraceContextCarrier — for example an MCP request's params._meta object
— instead of HTTP request headers.
OtelTracerHook chains an extraction pass through this getter after an ordinary HTTP-header
extraction (via RestRequestTextMapGetter) so an explicit carrier value wins while an
absent/invalid one falls back to whatever the HTTP-header extraction already produced. This relies
entirely on the standard TextMapPropagator contract — extraction that finds nothing
usable for a given concern returns the supplied Context unmodified
— so no bespoke precedence-merging logic lives here or in OtelTracerHook.
- Since:
- 10.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TraceContextCarrierTextMapGetterProcess-wide singleton instance. -
Method Summary
Modifier and TypeMethodDescriptionget(TraceContextCarrier carrier, String key) keys(TraceContextCarrier carrier) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.opentelemetry.context.propagation.TextMapGetter
getAll
-
Field Details
-
INSTANCE
Process-wide singleton instance.
-
-
Method Details
-
keys
- Specified by:
keysin interfaceio.opentelemetry.context.propagation.TextMapGetter<TraceContextCarrier>
-
get
- Specified by:
getin interfaceio.opentelemetry.context.propagation.TextMapGetter<TraceContextCarrier>
-