@ThreadSafe public interface BaggageManager
Baggages and Baggages based on the current context.
This class returns builders that can be used to create the
implementation-dependent Baggages.
Implementations may have different constraints and are free to convert entry contexts to their
own subtypes. This means callers cannot assume the current context
is the same instance as the one placed into scope.
| Modifier and Type | Method and Description |
|---|---|
Baggage.Builder |
baggageBuilder()
Returns a new
Baggage.Builder. |
Baggage |
getCurrentBaggage()
Returns the current
Baggage. |
io.opentelemetry.context.Scope |
withContext(Baggage distContext)
Enters the scope of code where the given
Baggage is in the current context (replacing
the previous Baggage) and returns an object that represents that scope. |
Baggage getCurrentBaggage()
Baggage.Baggage.Baggage.Builder baggageBuilder()
Baggage.Builder.Baggage.Builder.io.opentelemetry.context.Scope withContext(Baggage distContext)
Baggage is in the current context (replacing
the previous Baggage) and returns an object that represents that scope. The scope is
exited when the returned object is closed.distContext - the Baggage to be set as the current context.Baggage is set as the current
context.