Module: Datadog::Tracing::Contrib::ActiveRecord::Events

Defined in:
lib/datadog/tracing/contrib/active_record/events.rb,
lib/datadog/tracing/contrib/active_record/events/sql.rb,
lib/datadog/tracing/contrib/active_record/events/instantiation.rb

Overview

Defines collection of instrumented ActiveRecord events

Defined Under Namespace

Modules: Instantiation, SQL

Constant Summary collapse

ALL =
[
  Events::Instantiation,
  Events::SQL
].freeze

Class Method Summary collapse

Class Method Details

.allObject



19
20
21
# File 'lib/datadog/tracing/contrib/active_record/events.rb', line 19

def all
  self::ALL
end

.subscribe!Object



27
28
29
# File 'lib/datadog/tracing/contrib/active_record/events.rb', line 27

def subscribe!
  all.each(&:subscribe!)
end

.subscriptionsObject



23
24
25
# File 'lib/datadog/tracing/contrib/active_record/events.rb', line 23

def subscriptions
  all.collect(&:subscriptions).collect(&:to_a).flatten
end