Class: Monitoring::PrometheusCounter

Inherits:
BaseCounter show all
Defined in:
lib/fluent/plugin/monitoring.rb

Overview

Prometheus implementation of counters.

Instance Method Summary collapse

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