public interface Propagator
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Propagator.Getter<C>
Interface that allows a
TextMapPropagator to read propagated fields from a
carrier. |
static interface |
Propagator.Setter<C>
Class that allows a
TextMapPropagator to set propagated fields into a
carrier. |
| Modifier and Type | Method and Description |
|---|---|
<C> Span.Builder |
extract(C carrier,
Propagator.Getter<C> getter)
Extracts the value from upstream.
|
List<String> |
fields() |
<C> void |
inject(TraceContext context,
C carrier,
Propagator.Setter<C> setter)
Injects the value downstream, for example as HTTP headers.
|
<C> void inject(TraceContext context, @Nullable C carrier, Propagator.Setter<C> setter)
Propagator.Setter, in which
case that null will be passed to the Propagator.Setter implementation.C - carrier of propagation fields, such as an http requestcontext - the Context containing the value to be injected.carrier - holds propagation fields. For example, an outgoing message or http
request.setter - invoked for each propagation key to add or remove.<C> Span.Builder extract(C carrier, Propagator.Getter<C> getter)
If the value could not be parsed, the underlying implementation will decide to set
an object representing either an empty value, an invalid value, or a valid value.
Implementation must not set null.
C - carrier of propagation fields, such as an http request.carrier - holds propagation fields. For example, an outgoing message or http
request.getter - invoked for each propagation key to get.Context containing the extracted value.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.