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

The following examples show how to use brave.baggage.BaggageField#getValue() . 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 4 votes vote down vote up
/** Returns null unless {@link BaggagePropagation} is in use */
@Override public String getBaggageItem(String key) {
  BaggageField field = BaggageField.getByName(delegate.context(), key);
  if (field == null) return null;
  return field.getValue(delegate.context());
}
 
Example 2
Source File: Tags.java    From brave with Apache License 2.0 4 votes vote down vote up
@Override protected String parseValue(BaggageField input, TraceContext context) {
  return input.getValue(context);
}
 
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(String)} and {@link
 * BaggageField#getValue()}
 */
@Deprecated @Nullable public static String get(String name) {
  BaggageField field = BaggageField.getByName(validateFieldName(name));
  if (field == null) return null;
  return field.getValue();
}
 
Example 4
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#getValue(TraceContext)}
 */
@Deprecated @Nullable public static String get(TraceContext context, String name) {
  BaggageField field = BaggageField.getByName(context, validateFieldName(name));
  if (field == null) return null;
  return field.getValue(context);
}
 
Example 5
Source File: BraveSpan.java    From brave with Apache License 2.0 4 votes vote down vote up
@Override public String getBaggageItem(String key) {
  BaggageField field = BaggageField.getByName(delegate.context(), key);
  return field != null ? field.getValue(delegate.context()) : null;
}