Class TagContextTextFormat.Getter<C>

java.lang.Object
io.opencensus.tags.propagation.TagContextTextFormat.Getter<C>
Type Parameters:
C - carrier of propagation fields, such as an http request
Enclosing class:
TagContextTextFormat

public abstract static class TagContextTextFormat.Getter<C> extends Object
Class that allows a TagContextTextFormat to read propagated fields from a carrier.

Getter is stateless and allows to be saved as a constant to avoid runtime allocations.

Since:
0.21
  • Constructor Details

    • Getter

      public Getter()
  • Method Details

    • get

      @Nullable public abstract String get(C carrier, String key)
      Returns the first value of the given propagation key or returns null.
      Parameters:
      carrier - carrier of propagation fields, such as an http request
      key - the key of the field.
      Returns:
      the first value of the given propagation key or returns null.
      Since:
      0.21