Java Code Examples for brave.baggage.BaggageField#updateValue()

The following examples show how to use brave.baggage.BaggageField#updateValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BraveSpan.java    From brave-opentracing with Apache License 2.0 5 votes vote down vote up
/** This is a NOOP unless {@link BaggagePropagation} is in use */
@Override public BraveSpan setBaggageItem(String key, String value) {
  BaggageField field = BaggageField.getByName(delegate.context(), key);
  if (field == null) return this;
  field.updateValue(delegate.context(), value);
  return this;
}
 
Example 2
Source File: ExtraFieldPropagation.java    From brave with Apache License 2.0 4 votes vote down vote up
/**
 * @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);
}
 
Example 3
Source File: ExtraFieldPropagation.java    From brave with Apache License 2.0 4 votes vote down vote up
/**
 * @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);
}
 
Example 4
Source File: BraveSpan.java    From brave with Apache License 2.0 4 votes vote down vote up
@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;
}