lib/fluent/plugin/monitoring.rb
# Exception-driven behavior to avoid synchronization errors.
Exception-driven behavior to avoid synchronization errors.
Exception - driven behavior to avoid synchronization errors .
def counter(name, _labels, docstring, _prefix, _aggregation)
      return PrometheusCounter.new(@registry.counter(name, docstring))
    rescue Prometheus::Client::Registry::AlreadyRegisteredError
      return PrometheusCounter.new(@registry.get(name))
    end
def counter ( name , _labels , docstring , _prefix , _aggregation ) return PrometheusCounter . new ( @registry . counter ( name , docstring ) ) rescue Prometheus :: Client :: Registry :: AlreadyRegisteredError return PrometheusCounter . new ( @registry . get ( name ) ) end
Exception-driven behavior to avoid synchronization errors.
Exception - driven behavior to avoid synchronization errors .
# When we upgrade to Prometheus client 0.10.0 or higher, pass the # labels in the metric constructor. The 'labels' field in # Prometheus client 0.9.0 has a different function and will not # work as intended.
name
<not_specific>
_labels
<not_specific>
docstring
<not_specific>
_prefix
<not_specific>
_aggregation
<not_specific>