Top Description Fields Constructors Methods
io.opentelemetry.api.trace.propagation.internal

public final Class W3CTraceContextEncoding

extends Object
Class Inheritance
Annotations
@Immutable
Static Imports
io.opentelemetry.api.internal.Utils.checkArgument

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

Modifier and TypeField and Description
private static final char
private static final Pattern
private static final char
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TraceState
decodeTraceState(String traceStateHeader)

Decodes a trace state header into a TraceState object.

public static String
encodeTraceState(TraceState traceState)

Return the trace state encoded as a string according to the W3C specification.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

TRACESTATE_ENTRY_DELIMITERback to summary
private static final char TRACESTATE_ENTRY_DELIMITER
TRACESTATE_ENTRY_DELIMITER_SPLIT_PATTERNback to summary
private static final Pattern TRACESTATE_ENTRY_DELIMITER_SPLIT_PATTERN
TRACESTATE_KEY_VALUE_DELIMITERback to summary
private static final char TRACESTATE_KEY_VALUE_DELIMITER
TRACESTATE_MAX_MEMBERSback to summary
private static final int TRACESTATE_MAX_MEMBERS
TRACESTATE_MAX_SIZEback to summary
private static final int TRACESTATE_MAX_SIZE

Constructor Detail

W3CTraceContextEncodingback to summary
private W3CTraceContextEncoding()

Method Detail

decodeTraceStateback to summary
public static TraceState decodeTraceState(String traceStateHeader)

Decodes a trace state header into a TraceState object.

Exceptions
IllegalArgumentException:
if traceStateHeader does not comply with the specification
encodeTraceStateback to summary
public static String encodeTraceState(TraceState traceState)

Return the trace state encoded as a string according to the W3C specification.