Class W3CTraceContextEncoding

java.lang.Object
io.opentelemetry.api.trace.propagation.internal.W3CTraceContextEncoding

@Immutable public final class W3CTraceContextEncoding extends Object
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.

  • Method Details

    • decodeTraceState

      public static TraceState decodeTraceState(String traceStateHeader)
      Decodes a trace state header into a TraceState object.
      Throws:
      IllegalArgumentException - if traceStateHeader does not comply with the specification
    • encodeTraceState

      public static String encodeTraceState(TraceState traceState)
      Return the trace state encoded as a string according to the W3C specification.