use of brave.baggage.BaggageField in project brave by openzipkin.
the class SingleHeaderCodec method onEntry.
@Override
public boolean onEntry(ValueUpdater target, CharSequence buffer, int beginKey, int endKey, int beginValue, int endValue) {
BaggageField field = BaggageField.create(buffer.subSequence(beginKey, endKey).toString());
String value = buffer.subSequence(beginValue, endValue).toString();
return target.updateValue(field, value);
}
use of brave.baggage.BaggageField in project brave by openzipkin.
the class BraveSpan method setBaggageItem.
@Override
public io.opentracing.Span setBaggageItem(String key, String value) {
BaggageField field = BaggageField.getByName(delegate.context(), key);
if (field == null)
return this;
field.updateValue(delegate.context(), value);
return this;
}
use of brave.baggage.BaggageField in project brave by openzipkin.
the class ExtraFieldPropagation method set.
/**
* @deprecated Since 5.11 use {@link BaggageField#getByName(String)} and {@link
* BaggageField#updateValue(String)}
*/
@Deprecated
public static void set(String name, String value) {
BaggageField field = BaggageField.getByName(validateFieldName(name));
if (field == null)
return;
field.updateValue(value);
}
use of brave.baggage.BaggageField in project brave by openzipkin.
the class ExtraFieldPropagation method set.
/**
* @deprecated Since 5.11 use {@link BaggageField#getByName(TraceContext, String)} and {@link
* BaggageField#updateValue(String)}
*/
@Deprecated
public static void set(TraceContext context, String name, String value) {
BaggageField field = BaggageField.getByName(context, validateFieldName(name));
if (field == null)
return;
field.updateValue(context, value);
}
Aggregations