@ThreadSafe public final class DefaultBaggageManager extends Object implements BaggageManager
BaggageManager.| Constructor and Description |
|---|
DefaultBaggageManager() |
| Modifier and Type | Method and Description |
|---|---|
Baggage.Builder |
baggageBuilder()
Returns a new
Baggage.Builder. |
Baggage |
getCurrentBaggage()
Returns the current
Baggage. |
static BaggageManager |
getInstance()
Returns a
BaggageManager singleton that is the default implementation for BaggageManager. |
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. |
public static BaggageManager getInstance()
BaggageManager singleton that is the default implementation for BaggageManager.BaggageManager singleton that is the default implementation for BaggageManager.public Baggage getCurrentBaggage()
BaggageManagerBaggage.getCurrentBaggage in interface BaggageManagerBaggage.public Baggage.Builder baggageBuilder()
BaggageManagerBaggage.Builder.baggageBuilder in interface BaggageManagerBaggage.Builder.public io.opentelemetry.context.Scope withContext(Baggage distContext)
BaggageManagerBaggage 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.withContext in interface BaggageManagerdistContext - the Baggage to be set as the current context.Baggage is set as the current
context.