Class ProbabilisticSampleRate

  • All Implemented Interfaces:
    SamplingStrategy

    public class ProbabilisticSampleRate
    extends java.lang.Object
    implements SamplingStrategy
    Simple implementation of OpenCensus algorithm for probabilistic rate limiting as outlined in https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/Sampling.md
    • Constructor Detail

      • ProbabilisticSampleRate

        public ProbabilisticSampleRate​(MonotonicNanoClock nanoClock,
                                       java.util.function.Supplier<java.util.Random> randomSupplier,
                                       double desiredSamplesPerSec)