class Datadog::Sampling::RateLimiter

Checks for rate limiting on a resource.

Public Instance Methods

allow?(size) click to toggle source

Checks if resource of specified size can be conforms with the current limit.

Implementations of this method are not guaranteed to be side-effect free.

@return [Boolean] whether a resource conforms with the current limit

# File lib/ddtrace/sampling/rate_limiter.rb, line 14
def allow?(size); end
effective_rate() click to toggle source

The effective rate limiting ratio based on recent calls to `allow?`.

@return [Float] recent allowance ratio

# File lib/ddtrace/sampling/rate_limiter.rb, line 20
def effective_rate; end