Sha256: f33bdb2b4cb879b476c9a5e190106aca1b951fa842bee89d5219c2929f25ddad

Contents?: true

Size: 884 Bytes

Versions: 33

Compression:

Stored size: 884 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
require 'new_relic/agent/instrumentation/active_record_subscriber'

DependencyDetection.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
    !NewRelic::Agent.config[:disable_activerecord_instrumentation] &&
      !NewRelic::Agent::Instrumentation::ActiveRecordSubscriber.subscribed?
  end

  executes do
    ::NewRelic::Agent.logger.info 'Installing ActiveRecord 4 instrumentation'
  end

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

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
newrelic_rpm-3.12.0.288 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.11.2.286 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.11.1.284 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.11.0.283 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.10.0.279 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.9.275 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.8.273 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.7.266 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.6.257 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.5.251 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.4.245 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.3.241 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.2.239 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.1.236 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.9.0.229 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.8.1.221 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.8.0.218 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.7.3.204 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.7.3.199 lib/new_relic/agent/instrumentation/active_record_4.rb
newrelic_rpm-3.7.2.195 lib/new_relic/agent/instrumentation/active_record_4.rb