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.
24 25 26 |
# File 'lib/fluent/plugin/monitoring.rb', line 24 def initialize(prometheus_counter) @counter = prometheus_counter end |
Instance Method Details
#increment(by: 1, labels: {}) ⇒ Object
28 29 30 |
# File 'lib/fluent/plugin/monitoring.rb', line 28 def increment(by: 1, labels: {}) @counter.increment(labels, by) end |