Class: EventTracer::DatadogLogger

Inherits:
BasicDecorator show all
Defined in:
lib/event_tracer/datadog_logger.rb

Constant Summary collapse

SUPPORTED_METRIC_TYPES =
{
  counter: :count,
  distribution: :distribution,
  gauge: :gauge,
  set: :set,
  histogram: :histogram
}.freeze
DEFAULT_METRIC_TYPE =
:count
DEFAULT_COUNTER =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BasicDecorator

#__getobj__, #__setobj__, #fail_result, #success_result

Constructor Details

#initialize(decoratee, allowed_tags: [], default_tags: {}) ⇒ DatadogLogger

Returns a new instance of DatadogLogger.



27
28
29
30
31
# File 'lib/event_tracer/datadog_logger.rb', line 27

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

Instance Attribute Details

#allowed_tagsObject (readonly)

Returns the value of attribute allowed_tags.



25
26
27
# File 'lib/event_tracer/datadog_logger.rb', line 25

def allowed_tags
  @allowed_tags
end