TraceContext, TraceIdContextpublic class SamplingFlags extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
SamplingFlags.Builder |
Deprecated.
prefer using constants. This will be removed in Brave v6
|
| Modifier and Type | Field | Description |
|---|---|---|
static SamplingFlags |
DEBUG |
|
static SamplingFlags |
EMPTY |
|
static SamplingFlags |
NOT_SAMPLED |
|
static SamplingFlags |
SAMPLED |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
debug() |
True implies
sampled(), and is additionally a request to override any storage or
collector layer sampling. |
Boolean |
sampled() |
Sampled means send span data to Zipkin (or something else compatible with its data).
|
boolean |
sampledLocal() |
True records this trace locally even if it is not
sampled downstream. |
String |
toString() |
public static final SamplingFlags EMPTY
public static final SamplingFlags NOT_SAMPLED
public static final SamplingFlags SAMPLED
public static final SamplingFlags DEBUG
@Nullable public final Boolean sampled()
Here are the valid options:
Once set to true or false, it is expected that this decision is propagated and honored downstream.
Note: sampling does not imply the trace is invisible to others. For example, a common practice is to generate and propagate identifiers always. This allows other systems, such as logging, to correlate even when the tracing system has no data.
public final boolean sampledLocal()
sampled downstream.
Defaults to false.
Note: Setting this does not affect remote sampled status.
The use case for this is storing data at other sampling rates, or local aggregation of
metrics or service aggregations. How to action this data may or may not require inspection of
other propagated information.
public final boolean debug()
sampled(), and is additionally a request to override any storage or
collector layer sampling. Defaults to false.Copyright © 2018 OpenZipkin. All rights reserved.