BaggageContext
and BaggageProvider
interfaces of the Tracing PlaneSee: Description
Interface | Description |
---|---|
BaggageContext |
A
BaggageContext is an opaque context object belonging to an execution. |
BaggageListener.BranchListener<B extends BaggageContext> |
Wraps calls to
BaggageProvider.branch(BaggageContext) so that the baggage instance(s) can be modified. |
BaggageListener.JoinListener<B extends BaggageContext> |
Wraps calls to
BaggageProvider.join(BaggageContext, BaggageContext) so that baggage instance(s) can be
modified. |
BaggageProvider<B extends BaggageContext> |
A
BaggageProvider provides an implementation of BaggageContext objects. |
BaggageProviderFactory |
Factory for
BaggageProvider instances; primarily used to configure the BaggageProvider used by the
Baggage static API. |
TransitLayer |
Maintains
BaggageContext instances for requests. |
TransitLayerFactory |
Factory for
TransitLayer instances; primarily used to configure the TransitLayer used by the
ActiveBaggage static API. |
Class | Description |
---|---|
ActiveBaggage |
Extends the static
Baggage API with further methods for saving, retrieving, and interacting with
BaggageContext instances using the default TransitLayer . |
Baggage |
The static API for manipulating
BaggageContext instances using the default BaggageProvider . |
BaggageListener |
A
BaggageListener is a callback handler that is invoked whenever core BaggageProvider functions
(branch, merge, etc.) are invoked. |
DefaultBaggageProvider |
Loads the
BaggageProviderFactory specified by baggage.provider using reflection. |
DefaultTransitLayer |
Loads the
TransitLayerFactory specified by baggage.transit using reflection. |
Provides the main BaggageContext
and BaggageProvider
interfaces of the Tracing Plane
At a high level, BaggageContext
instances exist at the granularity of requests (or tasks, jobs, etc). The
purpose is to propagate a BaggageContext
alongside each request while it executes. BaggageContext
s
carry user-defined or tracing-tool defined data.
BaggageContext
instances should follow requests in a fine-grained manner. For example, if a request splits
off into multiple concurrent execution branches, then each branch of execution should receive its its own
BaggageContext
instance, created by calling BaggageProvider#branch(BaggageContext)
at the time the
request splits.
Likewise, if multiple concurrent branches merge, or if some task is dependent upon multiple predecessors completing,
then BaggageContext
instances can be merged using
BaggageProvider#join(BaggageContext, BaggageContext)
.
The Tracing Plane provides several BaggageContext
implementations, the main implementation being
BDLContext
in the brown.tracingplane.bdl
package.