Package 

Class RateByServiceSampler

  • All Implemented Interfaces:
    com.datadog.trace.common.sampling.PrioritySampler , com.datadog.trace.common.sampling.Sampler

    
    public class RateByServiceSampler
     implements Sampler, PrioritySampler
                        

    A rate sampler which maintains different sample rates per service+env name.

    The configuration of (serviceName,env)->rate is configured by the core agent.

    • Method Summary

      Modifier and Type Method Description
      boolean sample(DDSpan span) Sample a collection of traces based on the parent span
      void setSamplingPriority(DDSpan span) If span is a root span, set the span context samplingPriority to keep or drop
      • Methods inherited from class com.datadog.trace.common.sampling.Sampler

        sample
      • Methods inherited from class com.datadog.trace.common.sampling.PrioritySampler

        setSamplingPriority
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RateByServiceSampler

        RateByServiceSampler()
      • RateByServiceSampler

        RateByServiceSampler(Double defaultSampleRate)
    • Method Detail

      • sample

         boolean sample(DDSpan span)

        Sample a collection of traces based on the parent span

        Parameters:
        span - the parent span with its context
      • setSamplingPriority

         void setSamplingPriority(DDSpan span)

        If span is a root span, set the span context samplingPriority to keep or drop