Package 

Class RateBasedSampler

  • All Implemented Interfaces:
    com.datadog.android.core.sampling.Sampler

    
    public class RateBasedSampler<T extends Object>
     implements Sampler<T>
                        

    Sampler with the given sample rate which can be fixed or dynamic.

    • Constructor Detail

      • RateBasedSampler

        RateBasedSampler(Float sampleRate)
        Creates a new instance of RateBasedSampler with the given sample rate.
        Parameters:
        sampleRate - Sample rate to use.
      • RateBasedSampler

        RateBasedSampler(Double sampleRate)
        Creates a new instance of RateBasedSampler with the given sample rate.
        Parameters:
        sampleRate - Sample rate to use.
      • RateBasedSampler

        RateBasedSampler(Function0<Float> sampleRateProvider)
        Parameters:
        sampleRateProvider - Provider for the sample rate value which will be called each time the sampling decision needs to be made.