-
- All Implemented Interfaces:
-
com.datadog.trace.common.sampling.RateSampler,com.datadog.trace.common.sampling.Sampler
public abstract class DeterministicSampler implements RateSampler
This implements the deterministic sampling algorithm used by the Datadog Agent as well as the tracers for other languages
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDeterministicSampler.TraceSamplerUses trace-id as a sampling id
public final classDeterministicSampler.SpanSamplerUses span-id as a sampling id
-
Constructor Summary
Constructors Constructor Description DeterministicSampler(double rate)
-
Method Summary
Modifier and Type Method Description <T extends CoreSpan<T>> booleansample(T span)Sample a collection of traces based on the parent span doublegetSampleRate()static longcutoff(double rate)-
-
Method Detail
-
sample
<T extends CoreSpan<T>> boolean sample(T span)
Sample a collection of traces based on the parent span
- Parameters:
span- the parent span with its context
-
getSampleRate
double getSampleRate()
-
cutoff
static long cutoff(double rate)
-
-
-
-