BaggageField. Since some tracer implementations
require a scope to be wrapped around baggage, baggage must be closed so that the scope
does not leak, see BaggageInScope. Some tracer implementations make baggage
immutable (e.g. OpenTelemetry), so when the value gets updated they might create new
scope (others will return the same one - e.g. OpenZipkin Brave).
Represents a single baggage entry.
| Modifier and Type | Field and Description |
|---|---|
| public static final Baggage | NOOP
A noop implementation.
|
| Modifier and Type | Method and Description |
|---|---|
| public BaggageInScope | |
| public default BaggageInScope | Returns: aBaggageInScope instanceto set value)Sets the current baggage in scope with given value. |
| public default BaggageInScope | Returns: aBaggageInScope instancecontext containing baggage traceContext, String to set value)Sets the current baggage in scope with given value. |
| public Baggage | Returns: itselfto set value)
Deprecated
use
Sets the baggage value.
Baggage#makeCurrent(String)
|
| public Baggage | Returns: itselfcontext containing baggage traceContext, String to set value)
Deprecated
use
Sets the baggage value for the given Baggage#makeCurrent(TraceContext, String)
TraceContext.
|
| NOOP | back to summary |
|---|---|
| public static final Baggage NOOP Hides io. A noop implementation. | |
| makeCurrent | back to summary |
|---|---|
| public BaggageInScope makeCurrent() Sets the current baggage in scope.
| |
| makeCurrent | back to summary |
|---|---|
| public default BaggageInScope makeCurrent(String value) Sets the current baggage in scope with given value.
| |
| makeCurrent | back to summary |
|---|---|
| public default BaggageInScope makeCurrent(TraceContext traceContext, String value) Sets the current baggage in scope with given value.
| |
| set | back to summary |
|---|---|
| public Baggage set(String value)
Deprecated Sets the baggage value. | |
| set | back to summary |
|---|---|
| public Baggage set(TraceContext traceContext, String value)
Deprecated Sets the baggage value for the given
| |