Sha256: 384d8048e59af51910feb3bac834fbf6fa5e07b244479ba43e8b45829233a8c7

Contents?: true

Size: 728 Bytes

Versions: 26

Compression:

Stored size: 728 Bytes

Contents

# encoding: utf-8

require 'one_apm/inst/rails4/active_record_subscriber'

LibraryDetection.defer do
  named :active_record_4

  depends_on do
    defined?(::ActiveRecord) &&
    defined?(::ActiveRecord::Base) &&
    defined?(::ActiveRecord::VERSION) &&
    ::ActiveRecord::VERSION::MAJOR.to_i >= 4
  end

  depends_on do
    !OneApm::Manager.config[:disable_activerecord] &&
    !OneApm::Agent::Instrumentation::ActiveRecordSubscriber.subscribed?
  end

  executes do
    OneApm::Manager.logger.info 'Installing ActiveRecord 4 instrumentation'
  end

  executes do
    subscriber = OneApm::Agent::Instrumentation::ActiveRecordSubscriber.new
    ActiveSupport::Notifications.subscribe('sql.active_record', subscriber)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
oneapm_rpm-1.3.2 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.3.2.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.3.1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.3.1.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.3.0 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.3.0.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.9 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.9.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.8 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.8.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.7 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.7.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.6 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.6.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.5 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.5.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.4 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.4.rc1 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.3 lib/one_apm/inst/orm/active_record_4.rb
oneapm_rpm-1.2.3.rc2 lib/one_apm/inst/orm/active_record_4.rb