Sha256: f97fa6f5233c2b79efe302388cb0a3c43603762453ed8c284c0039872084398c

Contents?: true

Size: 652 Bytes

Versions: 12

Compression:

Stored size: 652 Bytes

Contents

# typed: false

require_relative 'events/instantiation'
require_relative 'events/sql'

module Datadog
  module Tracing
    module Contrib
      module ActiveRecord
        # Defines collection of instrumented ActiveRecord events
        module Events
          ALL = [
            Events::Instantiation,
            Events::SQL
          ].freeze

          module_function

          def all
            self::ALL
          end

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

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ddtrace-1.9.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.8.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.7.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.6.1 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.6.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.5.2 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.5.1 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.5.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.4.2 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.4.1 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.4.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.3.0 lib/datadog/tracing/contrib/active_record/events.rb