public final class PropagatorStack extends Object implements Propagator
Propagator instances,
while exposing a single Propagator interface. Propagator
instances are added through pushPropagator.
On extract, PropagatorStack tries each Propagator, starting
at the top, stopping with the first SpanContext that is
successfully extracted.
On inject, PropagatorStack inserts all propagation formats into
the carrier.BINARY, HTTP_HEADERS, TEXT_MAP| Constructor and Description |
|---|
PropagatorStack(io.opentracing.propagation.Format format)
Creates a new PropagatorStack associated with the specified
Format. |
| Modifier and Type | Method and Description |
|---|---|
<C> SpanContext |
extract(C carrier) |
io.opentracing.propagation.Format |
format() |
<C> void |
inject(SpanContext context,
C carrier) |
PropagatorStack |
pushPropagator(Propagator propagator)
Pushes a
Propagator onto the top of the stack. |
public PropagatorStack(io.opentracing.propagation.Format format)
Format.
Observe that a new Format should *not* be created if the data is being
propagated through http headers or a text map. Instead, use the respective
builtin Format. In case of doubt, contact LightStep for advice.format - Instance of Format
associated with this PropagatorStack.public io.opentracing.propagation.Format format()
public PropagatorStack pushPropagator(Propagator propagator)
Propagator onto the top of the stack.propagator - Instance of Propagator used as part of extraction and injection.public <C> SpanContext extract(C carrier)
extract in interface Propagatorpublic <C> void inject(SpanContext context, C carrier)
inject in interface PropagatorCopyright © 2023 LightStep. All rights reserved.