public final class TraceContextOrSamplingFlags extends Object
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:
create(TraceContext)create(TraceIdContext)create(SamplingFlags)If your propagation implementation adds extra data, append it via TraceContextOrSamplingFlags.Builder.addExtra(Object).
This started as a port of com.github.kristofa.brave.TraceData, which served the same
purpose.
TraceContext.Extractor| Modifier and Type | Class | Description |
|---|---|---|
static class |
TraceContextOrSamplingFlags.Builder |
| Modifier and Type | Field | Description |
|---|---|---|
static TraceContextOrSamplingFlags |
DEBUG |
|
static TraceContextOrSamplingFlags |
EMPTY |
|
static TraceContextOrSamplingFlags |
NOT_SAMPLED |
|
static TraceContextOrSamplingFlags |
SAMPLED |
public static final TraceContextOrSamplingFlags EMPTY
public static final TraceContextOrSamplingFlags NOT_SAMPLED
public static final TraceContextOrSamplingFlags SAMPLED
public static final TraceContextOrSamplingFlags DEBUG
public static TraceContextOrSamplingFlags.Builder newBuilder()
@Nullable public Boolean sampled()
SamplingFlags.sampled(), regardless of subtype.public final boolean sampledLocal()
SamplingFlags.sampledLocal()}, regardless of subtype.@Deprecated public TraceContextOrSamplingFlags sampled(@Nullable Boolean sampled)
public TraceContextOrSamplingFlags sampled(boolean sampled)
@Nullable public TraceContext context()
@Nullable public TraceIdContext traceIdContext()
@Nullable public SamplingFlags samplingFlags()
public final List<Object> extra()
context() is null: A list of additional data extracted from the carrier.TraceContext.extra()public final TraceContextOrSamplingFlags.Builder toBuilder()
public static TraceContextOrSamplingFlags create(TraceContext context)
public static TraceContextOrSamplingFlags create(TraceIdContext traceIdContext)
public static TraceContextOrSamplingFlags create(SamplingFlags flags)
public static TraceContextOrSamplingFlags create(@Nullable Boolean sampled, boolean debug)
Copyright © 2018 OpenZipkin. All rights reserved.