Module: Datadog::Contrib::ActiveSupport::Notifications::Event

Defined in:
lib/ddtrace/contrib/active_support/notifications/event.rb

Overview

Defines behaviors for an ActiveSupport::Notifications event. Compose this into a module or class, then define

event_name, #span_name, and #process. You can then

invoke Event.subscribe! to more easily subscribe to an event.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
16
17
# File 'lib/ddtrace/contrib/active_support/notifications/event.rb', line 13

def self.included(base)
  base.include(Subscriber)
  base.extend(ClassMethods)
  base.send(:on_subscribe) { base.subscribe }
end