Class: Prometheus::Client::Gauge

Inherits:
Metric
  • Object
show all
Defined in:
lib/prometheus/client/gauge.rb

Instance Method Summary collapse

Methods inherited from Metric

#get, #initialize, #to_json

Constructor Details

This class inherits a constructor from Prometheus::Client::Metric

Instance Method Details

#set(labels, value) ⇒ Object

Sets the value for the given label set



11
12
13
# File 'lib/prometheus/client/gauge.rb', line 11

def set(labels, value)
  @values[label_set_for(labels)] = value
end

#typeObject



6
7
8
# File 'lib/prometheus/client/gauge.rb', line 6

def type
  :gauge
end