public class TraceRatioBasedSampler extends java.lang.Object implements Sampler
(Long.MAX_VALUE * traceRatio)
When the sampler is presented with the hex encoded trace id, a
deterministic random value (R) is derived by extracting the last 8 bytes
(16 characters) of the id and converting into a long value.
| Constructor and Description |
|---|
TraceRatioBasedSampler(SamplerConfig samplerConfig)
Construct a new TraceRatioBasedSampler with the desired ratio
supplied as a float value in the SamplerConfig instance.
|
| Modifier and Type | Method and Description |
|---|---|
float |
calculatePriority(Transaction tx,
Granularity granularity)
Calculate the priority of a trace.
|
java.lang.String |
getDescription()
Human-readable description of this sampler's name and important qualities.
|
long |
getThreshold()
Retrieve the current rejection threshold value
|
SamplerType |
getType()
Get the type of this Sampler
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisValidSamplingTarget, isValidTraceRatio, traceIdFromTransactionpublic TraceRatioBasedSampler(SamplerConfig samplerConfig)
samplerConfig - the agent's finalized sampler configurationpublic float calculatePriority(Transaction tx, Granularity granularity)
SamplercalculatePriority in interface Samplertx - the transaction to calculate the priority forpublic SamplerType getType()
Samplerpublic java.lang.String getDescription()
SamplergetDescription in interface Samplerpublic long getThreshold()