Package io.opencensus.trace.propagation
Class TextFormat.Getter<C>
- java.lang.Object
-
- io.opencensus.trace.propagation.TextFormat.Getter<C>
-
- Type Parameters:
C
- carrier of propagation fields, such as an http request
- Enclosing class:
- TextFormat
public abstract static class TextFormat.Getter<C> extends java.lang.Object
Class that allows aTextFormat
to read propagated fields from a carrier.Getter
is stateless and allows to be saved as a constant to avoid runtime allocations.- Since:
- 0.11
-
-
Constructor Summary
Constructors Constructor Description Getter()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.String
get(C carrier, java.lang.String key)
Returns the first value of the given propagationkey
or returnsnull
.
-
-
-
Method Detail
-
get
@Nullable public abstract java.lang.String get(C carrier, java.lang.String key)
Returns the first value of the given propagationkey
or returnsnull
.- Parameters:
carrier
- carrier of propagation fields, such as an http requestkey
- the key of the field.- Returns:
- the first value of the given propagation
key
or returnsnull
. - Since:
- 0.11
-
-