Sha256: 276f2a5de04eddd46e1d66b8113f19e5578ba7123fb3d90b3323f5c527d5e687

Contents?: true

Size: 710 Bytes

Versions: 4

Compression:

Stored size: 710 Bytes

Contents

# typed: false

require 'datadog/tracing/contrib/active_record/events/instantiation'
require 'datadog/tracing/contrib/active_record/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

4 entries across 4 versions & 1 rubygems

Version Path
ddtrace-1.2.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.1.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.0.0 lib/datadog/tracing/contrib/active_record/events.rb
ddtrace-1.0.0.beta2 lib/datadog/tracing/contrib/active_record/events.rb