Class: PromMultiProc::Gauge

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

Instance Attribute Summary

Attributes inherited from Collector

#metric_methods, #name

Instance Method Summary collapse

Methods inherited from Collector

#initialize, #to_msg, #valid_label_keys?, #valid_label_values?, #valid_method?, #valid_value?, #validate!

Constructor Details

This class inherits a constructor from PromMultiProc::Collector

Instance Method Details

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



15
16
17
# File 'lib/prom_multi_proc/gauge.rb', line 15

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

#dec(labels = {}) ⇒ Object



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

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

#inc(labels = {}) ⇒ Object



7
8
9
# File 'lib/prom_multi_proc/gauge.rb', line 7

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

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



3
4
5
# File 'lib/prom_multi_proc/gauge.rb', line 3

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

#set_to_current_time(labels = {}) ⇒ Object



23
24
25
# File 'lib/prom_multi_proc/gauge.rb', line 23

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

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



19
20
21
# File 'lib/prom_multi_proc/gauge.rb', line 19

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