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.



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