Class: PromMultiProc::Gauge

Inherits:
Collector show all
Defined in:
lib/prom_multi_proc/gauge.rb

Constant Summary

Constants inherited from Collector

Collector::EXCLUDED_FROM_METRIC_METHODS

Instance Attribute Summary

Attributes inherited from Collector

#name

Instance Method Summary collapse

Methods inherited from Collector

#initialize, metric_methods, #metric_methods, #to_msg, #validate!

Constructor Details

This class inherits a constructor from PromMultiProc::Collector

Instance Method Details

#add(value, labels = {}) ⇒ Object



17
18
19
# File 'lib/prom_multi_proc/gauge.rb', line 17

def add(value, labels = {})
  write("add", value, labels)
end

#dec(labels = {}) ⇒ Object



13
14
15
# File 'lib/prom_multi_proc/gauge.rb', line 13

def dec(labels = {})
  write("dec", 1, labels)
end

#inc(labels = {}) ⇒ Object



9
10
11
# File 'lib/prom_multi_proc/gauge.rb', line 9

def inc(labels = {})
  write("inc", 1, labels)
end

#set(value, labels = {}) ⇒ Object



5
6
7
# File 'lib/prom_multi_proc/gauge.rb', line 5

def set(value, labels = {})
  write("set", value, labels)
end

#set_to_current_time(labels = {}) ⇒ Object



25
26
27
# File 'lib/prom_multi_proc/gauge.rb', line 25

def set_to_current_time(labels = {})
  write("set_to_current_time", 1, labels)
end

#sub(value, labels = {}) ⇒ Object



21
22
23
# File 'lib/prom_multi_proc/gauge.rb', line 21

def sub(value, labels = {})
  write("sub", value, labels)
end