Sha256: 59d19ef75e763d68495188b1cc62eedf9842a582e03c80c9886c5b11fb35f27b

Contents?: true

Size: 697 Bytes

Versions: 4

Compression:

Stored size: 697 Bytes

Contents

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

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

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-8.13.1 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.13.0 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.12.0 lib/new_relic/agent/instrumentation/active_storage.rb
newrelic_rpm-8.11.0 lib/new_relic/agent/instrumentation/active_storage.rb