Module: Labkit::RateLimit::Metrics
- Defined in:
- lib/labkit/rate_limit/metrics.rb
Class Method Summary collapse
-
.calls_total ⇒ Object
:log rules are non-terminating: a check that matched only :log rules increments calls_total once per matched :log rule AND once with rule=“unmatched”, action=“allow”, since no terminating decision was made.
- .errors_total ⇒ Object
- .limit_gauge ⇒ Object
- .period_gauge ⇒ Object
Class Method Details
.calls_total ⇒ Object
:log rules are non-terminating: a check that matched only :log rules increments calls_total once per matched :log rule AND once with rule=“unmatched”, action=“allow”, since no terminating decision was made.
11 12 13 14 15 16 17 |
# File 'lib/labkit/rate_limit/metrics.rb', line 11 def calls_total Labkit::Metrics::Client.counter( :gitlab_labkit_rate_limiter_calls_total, 'Total number of successful rate limit checks', { rate_limiter: nil, rule: nil, action: nil } ) end |
.errors_total ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/labkit/rate_limit/metrics.rb', line 19 def errors_total Labkit::Metrics::Client.counter( :gitlab_labkit_rate_limiter_errors_total, 'Total number of rate limit check errors', { rate_limiter: nil } ) end |