Package org.springframework.cloud.sleuth
Interface BaggageManager
- All Known Subinterfaces:
Tracer
public interface BaggageManager
Manages
BaggageInScope entries. Upon retrieval / creation of a baggage entry
puts it in scope. Scope must be closed.- Since:
- 3.0.0
- Author:
- OpenTelemetry Authors, Marcin Grzejszczak
-
Method Summary
Modifier and TypeMethodDescriptioncreateBaggage(String name) Creates a newBaggageInScopeentry for the given name or returns an existing one if it's already present.createBaggage(String name, String value) Creates a newBaggageInScopeentry for the given name or returns an existing one if it's already present.getBaggage(String name) RetrievesBaggageInScopefor the given name.getBaggage(TraceContext traceContext, String name) RetrievesBaggageInScopefor the given name.
-
Method Details
-
getAllBaggage
- Returns:
- mapping of all baggage entries from the given scope
-
getBaggage
RetrievesBaggageInScopefor the given name.- Parameters:
name- baggage name- Returns:
- baggage or
nullif not present
-
getBaggage
RetrievesBaggageInScopefor the given name.- Parameters:
traceContext- trace context with baggage attached to itname- baggage name- Returns:
- baggage or
nullif not present
-
createBaggage
Creates a newBaggageInScopeentry 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
Creates a newBaggageInScopeentry 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
-