Class Tracestate
java.lang.Object
io.opencensus.trace.Tracestate
Carries tracing-system specific context in a list of key-value pairs. TraceState allows different
vendors propagate additional information and inter-operate with their legacy Id formats.
Implementation is optimized for a small list of key-value pairs.
Key is opaque string up to 256 characters printable. It MUST begin with a lowercase letter, and can only contain lowercase letters a-z, digits 0-9, underscores _, dashes -, asterisks *, and forward slashes /.
Value is opaque string up to 256 characters printable ASCII RFC0020 characters (i.e., the range 0x20 to 0x7E) except comma , and =.
- Since:
- 0.16
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class forMessageEvent.static classImmutable key-value pair forTracestate. -
Method Summary
Modifier and TypeMethodDescriptionstatic Tracestate.Builderbuilder()Returns aBuilderbased on an emptyTracestate.Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.abstract List<Tracestate.Entry> Returns aListview of the mappings contained in thisTraceState.Returns aBuilderbased on thisTracestate.
-
Method Details
-
get
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.- Parameters:
key- with which the specified value is to be associated- Returns:
- the value to which the specified key is mapped, or null if this map contains no mapping for the key.
- Since:
- 0.16
-
getEntries
-
builder
Returns aBuilderbased on an emptyTracestate.- Returns:
- a
Builderbased on an emptyTracestate. - Since:
- 0.16
-
toBuilder
Returns aBuilderbased on thisTracestate.- Returns:
- a
Builderbased on thisTracestate. - Since:
- 0.16
-