Class: EventTracer::PrometheusLogger
- Inherits:
-
BasicDecorator
- Object
- Delegator
- BasicDecorator
- EventTracer::PrometheusLogger
- Defined in:
- lib/event_tracer/prometheus_logger.rb
Constant Summary collapse
- SUPPORTED_METRIC_TYPES =
{ counter: :increment_count, gauge: :set_gauge }.freeze
- DEFAULT_INCREMENT =
1
Instance Attribute Summary collapse
-
#allowed_tags ⇒ Object
readonly
Returns the value of attribute allowed_tags.
Instance Method Summary collapse
-
#initialize(prometheus, allowed_tags: [], default_tags: {}, raise_if_missing: true) ⇒ PrometheusLogger
constructor
A new instance of PrometheusLogger.
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.
12 13 14 15 16 17 |
# File 'lib/event_tracer/prometheus_logger.rb', line 12 def initialize(prometheus, allowed_tags: [], default_tags: {}, raise_if_missing: true) super(prometheus) @allowed_tags = .freeze @default_tags = .freeze @raise_if_missing = raise_if_missing end |
Instance Attribute Details
#allowed_tags ⇒ Object (readonly)
Returns the value of attribute allowed_tags.
10 11 12 |
# File 'lib/event_tracer/prometheus_logger.rb', line 10 def @allowed_tags end |