Class: Datadog::Sampling::RateLimiter
- Inherits:
-
Object
- Object
- Datadog::Sampling::RateLimiter
- Defined in:
- lib/ddtrace/sampling/rate_limiter.rb
Overview
Checks for rate limiting on a resource.
Direct Known Subclasses
Instance Method Summary collapse
-
#allow?(size) ⇒ Boolean
Checks if resource of specified size can be conforms with the current limit.
-
#effective_rate ⇒ Float
The effective rate limiting ratio based on recent calls to
allow?
.
Instance Method Details
#allow?(size) ⇒ Boolean
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.
15 |
# File 'lib/ddtrace/sampling/rate_limiter.rb', line 15 def allow?(size); end |
#effective_rate ⇒ Float
The effective rate limiting ratio based on
recent calls to allow?
.
21 |
# File 'lib/ddtrace/sampling/rate_limiter.rb', line 21 def effective_rate; end |