Class W3CTraceContextEncoding
java.lang.Object
io.opentelemetry.api.trace.propagation.internal.W3CTraceContextEncoding
Implementation of the
tracestate
header encoding and decoding as defined by the W3C Trace Context
recommendation.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char
private static final Pattern
private static final char
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TraceState
decodeTraceState
(String traceStateHeader) Decodes a trace state header into aTraceState
object.static String
encodeTraceState
(TraceState traceState) Return the trace state encoded as a string according to the W3C specification.
-
Field Details
-
TRACESTATE_MAX_SIZE
private static final int TRACESTATE_MAX_SIZE- See Also:
-
TRACESTATE_MAX_MEMBERS
private static final int TRACESTATE_MAX_MEMBERS- See Also:
-
TRACESTATE_KEY_VALUE_DELIMITER
private static final char TRACESTATE_KEY_VALUE_DELIMITER- See Also:
-
TRACESTATE_ENTRY_DELIMITER
private static final char TRACESTATE_ENTRY_DELIMITER- See Also:
-
TRACESTATE_ENTRY_DELIMITER_SPLIT_PATTERN
-
-
Constructor Details
-
W3CTraceContextEncoding
private W3CTraceContextEncoding()
-
-
Method Details
-
decodeTraceState
Decodes a trace state header into aTraceState
object.- Throws:
IllegalArgumentException
- iftraceStateHeader
does not comply with the specification
-
encodeTraceState
Return the trace state encoded as a string according to the W3C specification.
-