Class: Evil::Metrics::Prometheus::GaugeWrapper
- Inherits:
-
MetricWrapper
- Object
- Prometheus::Client::Metric
- MetricWrapper
- Evil::Metrics::Prometheus::GaugeWrapper
- Defined in:
- lib/evil/metrics/prometheus/gauge_wrapper.rb
Instance Attribute Summary
Attributes inherited from MetricWrapper
Instance Method Summary collapse
Methods inherited from MetricWrapper
#docstring, #get, #initialize, #name, #values
Constructor Details
This class inherits a constructor from Evil::Metrics::Prometheus::MetricWrapper
Instance Method Details
#set(labels, value) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/evil/metrics/prometheus/gauge_wrapper.rb', line 12 def set(labels, value) unless value.is_a?(Numeric) raise ArgumentError, 'value must be a number' end metric.set(labels, value) end |
#type ⇒ Object
8 9 10 |
# File 'lib/evil/metrics/prometheus/gauge_wrapper.rb', line 8 def type :gauge end |