Sha256: 51aed77f488bbf64e5673ad756c0d473fc27ce6372749a66014dd4ec6631ea92

Contents?: true

Size: 926 Bytes

Versions: 12

Compression:

Stored size: 926 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_relative 'active_support_logger/instrumentation'
require_relative 'active_support_logger/chain'
require_relative 'active_support_logger/prepend'

DependencyDetection.defer do
  named :active_support_logger

  depends_on do
    defined?(ActiveSupport::Logger) && defined?(ActiveSupport::Logger.broadcast)
  end

  executes do
    NewRelic::Agent.logger.info('Installing ActiveSupport::Logger instrumentation')

    if use_prepend?
      # the only method currently instrumented is a class method
      prepend_instrument ActiveSupport::Logger.singleton_class, NewRelic::Agent::Instrumentation::ActiveSupportLogger::Prepend
    else
      chain_instrument NewRelic::Agent::Instrumentation::ActiveSupportLogger::Chain
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.12.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.11.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.10.2 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.10.1 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.10.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.9.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.8.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.7.1 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.7.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.6.0 lib/new_relic/agent/instrumentation/active_support_logger.rb