Class: Prometheus::Client::Gauge
- Defined in:
- lib/prometheus/client/gauge.rb
Overview
A Gauge is a metric that exposes merely an instantaneous value or some snapshot thereof.
Instance Attribute Summary
Attributes inherited from Metric
#base_labels, #docstring, #name
Instance Method Summary collapse
-
#set(labels, value) ⇒ Object
Sets the value for the given label set.
- #type ⇒ Object
Methods inherited from Metric
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
15 16 17 |
# File 'lib/prometheus/client/gauge.rb', line 15 def set(labels, value) @values[label_set_for(labels)] = value end |
#type ⇒ Object
10 11 12 |
# File 'lib/prometheus/client/gauge.rb', line 10 def type :gauge end |