Search in sources :

Example 1 with BaggageField

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);
}
Also used : BaggageField(brave.baggage.BaggageField)

Example 2 with BaggageField

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;
}
Also used : BaggageField(brave.baggage.BaggageField)

Example 3 with BaggageField

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);
}
Also used : SingleBaggageField(brave.baggage.BaggagePropagationConfig.SingleBaggageField) BaggageField(brave.baggage.BaggageField)

Example 4 with BaggageField

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);
}
Also used : SingleBaggageField(brave.baggage.BaggagePropagationConfig.SingleBaggageField) BaggageField(brave.baggage.BaggageField)

Aggregations

BaggageField (brave.baggage.BaggageField)4 SingleBaggageField (brave.baggage.BaggagePropagationConfig.SingleBaggageField)2