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)
Calculate the priority of a trace.
|
long |
getThreshold()
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 TraceRatioBasedSampler(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 getThreshold()