public abstract class Sampler extends Object
Zipkin v1 uses before-the-fact sampling. This means that the decision to keep or drop the trace is made before any work is measured, or annotations are added. As such, the input parameter to zipkin v1 samplers is the trace ID (64-bit random number).
| Modifier and Type | Class and Description |
|---|---|
static class |
Sampler.ProbabilisticSampler
Accepts a percentage of trace ids by comparing their absolute value against a boundary.
|
| Constructor and Description |
|---|
Sampler() |
| Modifier and Type | Method and Description |
|---|---|
static Sampler |
create(float rate)
Returns a sampler, given a rate expressed as a percentage.
|
abstract boolean |
isSampled(long traceId)
Returns true if the trace ID should be recorded.
|
public abstract boolean isSampled(long traceId)
public static Sampler create(float rate)
rate - minimum sample rate is 0.0001, or 0.01% of tracesSampler.ProbabilisticSamplerCopyright © 2015–2016 OpenZipkin. All rights reserved.