public interface BaggageContext
A BaggageContext
is an opaque context object belonging to an execution. Baggage contexts are propagated
alongside requests as they execute -- they should be passed to new threads, included with work items (e.g.,
Runnable
, Callable
, etc.), serialized in network headers, and so on.
BaggageContext
objects have no direct methods for manipulating contexts or accessing data that they carry.
This is because, in the common case, a BaggageContext
is typically empty, and an empty context is typically
implemented using null values.
To propagate BaggageContext
objects, call BaggageProvider
methods such as
BaggageProvider.branch(BaggageContext)
, BaggageProvider.serialize(BaggageContext)
, etc.