Package io.micrometer.tracing
Interface Baggage
- All Superinterfaces:
BaggageView
Inspired by OpenZipkin Brave's
BaggageField. Since some tracer implementations
require a scope to be wrapped around baggage, baggage must be closed so that the scope
does not leak, see BaggageInScope. Some tracer implementations make baggage
immutable (e.g. OpenTelemetry), so when the value gets updated they might create new
scope (others will return the same one - e.g. OpenZipkin Brave).
Represents a single baggage entry.
- Since:
- 1.0.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionSets the current baggage in scope.default BaggageInScopemakeCurrent(TraceContext traceContext, String value) Sets the current baggage in scope with given value.default BaggageInScopemakeCurrent(String value) Sets the current baggage in scope with given value.set(TraceContext traceContext, String value) Deprecated.Deprecated.Methods inherited from interface io.micrometer.tracing.BaggageView
get, get, name
-
Field Details
-
NOOP
A noop implementation.
-
-
Method Details
-
set
Deprecated.Sets the baggage value.- Parameters:
value- to set- Returns:
- itself
-
set
Deprecated.Sets the baggage value for the givenTraceContext.- Parameters:
traceContext- context containing baggagevalue- to set- Returns:
- itself
-
makeCurrent
BaggageInScope makeCurrent()Sets the current baggage in scope.- Returns:
- a
BaggageInScopeinstance
-
makeCurrent
Sets the current baggage in scope with given value.- Parameters:
value- to set- Returns:
- a
BaggageInScopeinstance
-
makeCurrent
Sets the current baggage in scope with given value.- Parameters:
traceContext- context containing baggagevalue- to set- Returns:
- a
BaggageInScopeinstance
-
makeCurrent(TraceContext, String)