class Prometheus::Client::Gauge
A Gauge is a metric that exposes merely an instantaneous value or some snapshot thereof.
Public Instance Methods
set(labels, value)
click to toggle source
Sets the value for the given label set
# File lib/prometheus/client/gauge.rb, line 14 def set(labels, value) unless value.is_a?(Numeric) raise ArgumentError, 'value must be a number' end @values[label_set_for(labels)] = value.to_f end
type()
click to toggle source
# File lib/prometheus/client/gauge.rb, line 9 def type :gauge end