public function setSamplingRate($samplingRate)
    {
        if ($samplingRate <= 0.0 || 1.0 < $samplingRate) {
            throw new \LogicException('Sampling rate shall be within ]0, 1]');
        }
        $this->samplingRate = $samplingRate;
        $this->samplingFunction = function($min, $max){
            return rand($min, $max);
        };
    }
public function setSamplingRate($samplingRate)
    {
        if ($samplingRate <= 0.0 || 1.0 < $samplingRate) {
            throw new \LogicException('Sampling rate shall be within ]0, 1]');
        }
        $this->samplingRate = $samplingRate;
        $this->samplingFunction = function($min, $max){
            return rand($min, $max);
        };
    }
public function setSamplingRate ( $ samplingRate ) { if ( $ samplingRate <= 0.0 || 1.0 < $ samplingRate ) { throw new \ LogicException ( 'Sampling rate shall be within ]0, 1]' ) ; } $ this -> samplingRate = $ samplingRate ; $ this -> samplingFunction = function ( $ min , $ max ) { return rand ( $ min , $ max ) ; } ; }
Actually defines the sampling rate used by the service.
If set to 0.1, the service will automatically discard 10%
of the incoming metrics. It will also automatically flag these
as sampled data to statsd.

@param float $samplingRate
Actually defines the sampling rate used by the service . If set to 0 . 1 the service will automatically discard 10% of the incoming metrics . It will also automatically flag these as sampled data to statsd .