Module: Datadog::Tracing::Events::InstanceMethods

Defined in:
lib/datadog/tracing/event.rb

Overview

Instance methods

Instance Method Summary collapse

Instance Method Details

#subscribe(**event_handlers) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/datadog/tracing/event.rb', line 21

def subscribe(**event_handlers)
  return unless event_handlers

  event_handlers.each do |event_name, handlers|
    handlers.each do |handler_name, handler|
      events.send(event_name).subscribe(handler_name, &handler)
    end
  end

  event_handlers
end