module Datadog::Contrib::ActiveSupport::Notifications::Event

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.

Public Class Methods

included(base) click to toggle source
# File lib/ddtrace/contrib/active_support/notifications/event.rb, line 12
def self.included(base)
  base.send(:include, Subscriber)
  base.send(:extend, ClassMethods)
  base.send(:on_subscribe) { base.subscribe }
end