Sha256: 25648c950df84651be7de8cffac8ffb69d059524dcd0f36ab8ace6327ed1f4aa

Contents?: true

Size: 684 Bytes

Versions: 6

Compression:

Stored size: 684 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.

require 'new_relic/agent/instrumentation/active_storage_subscriber'

DependencyDetection.defer do
  named :active_storage

  depends_on do
    defined?(::ActiveStorage) &&
      !NewRelic::Agent::Instrumentation::ActiveStorageSubscriber.subscribed?
  end

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

  executes do
    ActiveSupport::Notifications.subscribe(/\.active_storage$/,
      NewRelic::Agent::Instrumentation::ActiveStorageSubscriber.new)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
newrelic_rpm-8.9.0 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.8.0 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.7.0 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.6.0 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.5.0 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.4.0 lib/new_relic/agent/instrumentation/active_storage.rb