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