class PrometheusClientAddons::Prometheus::Client::MultiMetric
Attributes
base_labels[R]
name[R]
prefix[R]
Public Class Methods
new(prefix: '', base_labels: {})
click to toggle source
# File lib/prometheus_client_addons/prometheus/client/multi_metric.rb, line 10 def initialize(prefix: '', base_labels: {}) prefix = "#{prefix}_" unless prefix == '' @prefix = prefix @name = prefix @base_labels = base_labels multi_name_type.keys.each { |name| validate_name("#{prefix}#{name}".to_sym) } multi_name_docstring.keys.each { |name| validate_name("#{prefix}#{name}".to_sym) } multi_name_docstring.values.each(&method(:validate_docstring)) @validator = ::Prometheus::Client::LabelSetValidator.new @validator.valid?(base_labels) end
Public Instance Methods
multi_name_docstring()
click to toggle source
# File lib/prometheus_client_addons/prometheus/client/multi_metric.rb, line 28 def multi_name_docstring fail('Should return hash {name => docstrings}') end
multi_name_type()
click to toggle source
# File lib/prometheus_client_addons/prometheus/client/multi_metric.rb, line 24 def multi_name_type fail('Should return hash {name => type}') end
multi_values()
click to toggle source
# File lib/prometheus_client_addons/prometheus/client/multi_metric.rb, line 32 def multi_values fail('Should return hash {name => {label_set => value, label_set => value, }}') end