Class: EventTracer::PrometheusLogger

Inherits:
MetricLogger show all
Defined in:
lib/event_tracer/prometheus_logger.rb

Constant Summary collapse

SUPPORTED_METRIC_TYPES =
{
  counter: :increment_count,
  gauge: :set_gauge
}.freeze
DEFAULT_METRIC_TYPE =
:increment_count
DEFAULT_COUNTER =
1

Instance Attribute Summary

Attributes inherited from MetricLogger

#allowed_tags

Instance Method Summary collapse

Methods inherited from BasicDecorator

#__getobj__, #__setobj__, #fail_result, #success_result

Constructor Details

#initialize(prometheus, allowed_tags: [], default_tags: {}, raise_if_missing: true) ⇒ PrometheusLogger

Returns a new instance of PrometheusLogger.



13
14
15
16
17
18
# File 'lib/event_tracer/prometheus_logger.rb', line 13

def initialize(prometheus, allowed_tags: [], default_tags: {}, raise_if_missing: true)
  super(prometheus)
  @allowed_tags = allowed_tags.freeze
  @default_tags = default_tags.freeze
  @raise_if_missing = raise_if_missing
end