Class: Monitoring::PrometheusCounter
- Inherits:
-
BaseCounter
- Object
- BaseCounter
- Monitoring::PrometheusCounter
- Defined in:
- lib/fluent/plugin/monitoring.rb
Overview
Prometheus implementation of counters.
Instance Method Summary collapse
- #increment(by: 1, labels: {}) ⇒ Object
-
#initialize(prometheus_counter) ⇒ PrometheusCounter
constructor
A new instance of PrometheusCounter.
Constructor Details
#initialize(prometheus_counter) ⇒ PrometheusCounter
Returns a new instance of PrometheusCounter.
25 26 27 28 |
# File 'lib/fluent/plugin/monitoring.rb', line 25 def initialize(prometheus_counter) super() @counter = prometheus_counter end |
Instance Method Details
#increment(by: 1, labels: {}) ⇒ Object
30 31 32 |
# File 'lib/fluent/plugin/monitoring.rb', line 30 def increment(by: 1, labels: {}) @counter.increment(labels, by) end |