RateBasedSampler - DataDog/dd-sdk-android GitHub Wiki
class RateBasedSampler(sampleRateProvider: () -> Float) : Sampler
Sampler with the given sample rate which can be fixed or dynamic.
Parameters
sampleRateProvider | Provider for the sample rate value which will be called each time the sampling decision needs to be made. All the values should be on the scale 0;100. |
Constructors
RateBasedSampler
constructor(@FloatRange(from = 0.0, to = 100.0)sampleRate: Float)
constructor(@FloatRange(from = 0.0, to = 100.0)sampleRate: Double)
Creates a new instance of RateBasedSampler with the given sample rate.
Parameters
sampleRate | Sample rate to use. |
constructor(sampleRateProvider: () -> Float)
Parameters
sampleRateProvider | Provider for the sample rate value which will be called each time the sampling decision needs to be made. All the values should be on the scale 0;100. |
Functions
getSampleRate
open override fun getSampleRate(): Float