public class BaggageSetter
extends java.lang.Object
Span.| Constructor and Description |
|---|
BaggageSetter(BaggageRestrictionManager restrictionManager,
Metrics metrics) |
| Modifier and Type | Method and Description |
|---|---|
SpanContext |
setBaggage(Span span,
java.lang.String key,
java.lang.String value)
Sets the baggage key:value on the
Span and the corresponding
logs. |
public BaggageSetter(BaggageRestrictionManager restrictionManager, Metrics metrics)
public SpanContext setBaggage(Span span, java.lang.String key, java.lang.String value)
Span and the corresponding
logs. Whether the baggage is set on the span depends on if the key
is allowed to be set by this service.
A SpanContext is returned with the new baggage key:value set
if key is valid, else returns the existing SpanContext
on the Span.
span - the span to set the baggage onkey - the baggage key to setvalue - the baggage value to set