Injects and extracts a value as text into carriers that travel in-band across process boundaries. Encoding is expected to conform to the HTTP Header Field semantics. Values are often encoded as RPC/HTTP request headers.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | Propagator.Getter<
carrier of propagation fields, such as an http request. C>Interface that allows a |
| public static interface | Propagator.Setter<
carrier of propagation fields, such as an http request C>Class that allows a |
| Modifier and Type | Field and Description |
|---|---|
| public static final Propagator | NOOP
A noop implementation. |
| Modifier and Type | Method and Description |
|---|---|
| public < carrier of propagation fields, such as an http request. C> Span. | Returns: theContext containing the extracted value.holds propagation fields. For example, an outgoing message or http
request. carrier, Propagator.invoked for each propagation key to get. getterExtracts the value from upstream. |
| public List | |
| public < carrier of propagation fields, such as an http request C> void | inject(TraceContext
the context, C Context containing the value to be injected.holds propagation fields. For example, an outgoing message or http
request. carrier, Propagator.invoked for each propagation key to add or remove. setterInjects the value downstream, for example as HTTP headers. |
| NOOP | back to summary |
|---|---|
| public static final Propagator NOOP A noop implementation. This implementation could be used with sender/receiver that do not need any propagation. e.g. database access | |
| extract | back to summary |
|---|---|
| public <C> Span. Extracts the value from upstream. For example, as http headers.
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
| |
| fields | back to summary |
|---|---|
| public List | |
| inject | back to summary |
|---|---|
| public <C> void inject(TraceContext context, C carrier, Propagator. Injects the value downstream, for example as HTTP headers. The carrier may be null
to facilitate calling this method with a lambda for the
| |
Propagator to read propagated fields from a
carrier.
Getter is stateless and allows to be saved as a constant to avoid runtime
allocations.
| Modifier and Type | Field and Description |
|---|---|
| public static final Propagator. | NOOP
A noop implementation. |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| NOOP | back to summary |
|---|---|
| public static final Propagator. A noop implementation.
| |
| get | back to summary |
|---|---|
| public String get(C carrier, String key) Returns the first value of the given propagation | |
Propagator to set propagated fields into a carrier.
Setter is stateless and allows to be saved as a constant to avoid runtime
allocations.
| Modifier and Type | Field and Description |
|---|---|
| public static final Propagator. | NOOP
A noop implementation. |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| NOOP | back to summary |
|---|---|
| public static final Propagator. A noop implementation.
| |
| set | back to summary |
|---|---|
| public void set(C carrier, String key, String value) Replaces a propagated field with the given value.
For example, a setter for an | |