public class ProbabilityBasedSampler extends java.lang.Object implements Sampler
(1 - samplingProbability) * 2^56
When the sampler is presented with the hex encoded trace id, a
deterministic random value (R) is derived by extracting the last 7 bytes
(14 characters) of the id and converting into a long value.
| Constructor and Description |
|---|
ProbabilityBasedSampler(SamplerConfig samplerConfig)
Construct a new ProbabilityBasedSampler with the desired probability
supplied as a float value in the SamplerConfig instance.
|
| Modifier and Type | Method and Description |
|---|---|
float |
calculatePriority(Transaction tx)
Calculate the priority of a trace.
|
long |
getRejectionThreshold()
Retrieve the current rejection threshold value
|
java.lang.String |
getType()
Get the description/name of this Sampler
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisValidTraceRatio, traceIdFromTransactionpublic ProbabilityBasedSampler(SamplerConfig samplerConfig)
samplerConfig - the agent's finalized sampler configurationpublic float calculatePriority(Transaction tx)
SamplercalculatePriority in interface Samplertx - the transaction to calculate the priority forpublic java.lang.String getType()
Samplerpublic long getRejectionThreshold()