Class TraceContextOrSamplingFlags

java.lang.Object
brave.propagation.TraceContextOrSamplingFlags

public final class TraceContextOrSamplingFlags
extends Object
Union type that contains only one of trace context, trace ID context or sampling flags. This type is designed for use with Tracer.nextSpan(TraceContextOrSamplingFlags).

Users should not create instances of this, rather use TraceContext.Extractor provided by a Propagation implementation such as Propagation.B3_STRING.

Those implementing Propagation should use the following advice:

If your propagation implementation needs additional state, append it via TraceContextOrSamplingFlags.Builder.addExtra(Object).

This started as a port of com.github.kristofa.brave.TraceData, which served the same purpose.

Since:
4.0
See Also:
TraceContext.Extractor