Class: Prometheus::Client::Gauge

Inherits:
Metric
  • Object
show all
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

Methods inherited from Metric

#get, #initialize, #values

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

#typeObject



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

def type
  :gauge
end