Package io.micrometer.tracing
Interface BaggageManager
- All Known Subinterfaces:
Tracer
public interface BaggageManager
Manages
Baggage entries. Upon retrieval / creation of a baggage entry puts it
in scope. Scope must be closed.- Since:
- 1.0.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateBaggage(String name) Deprecated.createBaggage(String name, String value) Deprecated.default BaggageInScopecreateBaggageInScope(TraceContext traceContext, String name, String value) Creates a newBaggageentry, sets a value on it and puts it in scope.default BaggageInScopecreateBaggageInScope(String name, String value) Creates a newBaggageentry, sets a value on it and puts it in scope.getAllBaggage(TraceContext traceContext) getBaggage(TraceContext traceContext, String name) RetrievesBaggagefor the given name.getBaggage(String name) RetrievesBaggagefor the given name.
-
Field Details
-
NOOP
A noop implementation.
-
-
Method Details
-
getAllBaggage
- Returns:
- mapping of all baggage entries from the given scope
-
getAllBaggage
- Parameters:
traceContext- trace context with baggage. Ifnullwill try to get all baggage from current available context- Returns:
- mapping of all baggage entries from the given scope
-
getBaggage
RetrievesBaggagefor the given name.- Parameters:
name- baggage name- Returns:
- baggage if present or creates a new one if missing with
nullvalue
-
getBaggage
RetrievesBaggagefor the given name.- Parameters:
traceContext- trace context with baggage attached to itname- baggage name- Returns:
- baggage or
nullif not present on theTraceContext
-
createBaggage
Deprecated.Creates a newBaggageentry for the given name or returns an existing one if it's already present.- Parameters:
name- baggage name- Returns:
- new or already created baggage
-
createBaggage
Deprecated.Creates a newBaggageentry for the given name or returns an existing one if it's already present.- Parameters:
name- baggage namevalue- baggage value- Returns:
- new or already created baggage
-
createBaggageInScope
Creates a newBaggageentry, sets a value on it and puts it in scope.- Parameters:
name- baggage namevalue- baggage value- Returns:
- baggage with value
-
createBaggageInScope
Creates a newBaggageentry, sets a value on it and puts it in scope.- Parameters:
traceContext- trace context with baggage attached to itname- baggage namevalue- baggage value- Returns:
- baggage with value
-
createBaggageInScope(String, String)