Exception: Yabeda::Prometheus::Adapter::UndeclaredMetricTags

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/yabeda/prometheus/adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metric_name, caused_exception) ⇒ UndeclaredMetricTags

Returns a new instance of UndeclaredMetricTags.



13
14
15
16
17
18
19
# File 'lib/yabeda/prometheus/adapter.rb', line 13

def initialize(metric_name, caused_exception)
  @message = <<~MESSAGE.strip
    Prometheus requires all used tags to be declared at metric registration time. \
    Please add `tags` option to the declaration of metric `#{metric_name}`. \
    Error: #{caused_exception.message}
  MESSAGE
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



11
12
13
# File 'lib/yabeda/prometheus/adapter.rb', line 11

def message
  @message
end