Module: PrometheusExporter::Ext::Server::StatsCollector::ClassMethods

Defined in:
lib/prometheus_exporter/ext/server/stats_collector.rb

Instance Method Summary collapse

Instance Method Details

#register_gauge_with_expire(name, help, opts = {}) ⇒ Object

Registers PrometheusExporter::Metric::GaugeWithExpire observer.

Parameters:

  • name (Symbol)

    metric name.

  • help (String)

    metric description.

  • opts (Hash) (defaults to: {})

    additional options, supports ‘ttl` and `strategy` keys.



22
23
24
# File 'lib/prometheus_exporter/ext/server/stats_collector.rb', line 22

def register_gauge_with_expire(name, help, opts = {})
  register_metric(name, help, PrometheusExporter::Ext::Metric::GaugeWithExpire, opts)
end