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

Defined in:
lib/datadog/tracing/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



15
16
17
18
19
# File 'lib/datadog/tracing/contrib/active_support/notifications/event.rb', line 15

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