@ThreadSafe public final class DefaultBaggageManager extends java.lang.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()
BaggageManager
Baggage
.getCurrentBaggage
in interface BaggageManager
Baggage
.public Baggage.Builder baggageBuilder()
BaggageManager
Baggage.Builder
.baggageBuilder
in interface BaggageManager
Baggage.Builder
.public io.opentelemetry.context.Scope withContext(Baggage distContext)
BaggageManager
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.withContext
in interface BaggageManager
distContext
- the Baggage
to be set as the current context.Baggage
is set as the current
context.