Sha256: 4bd310fb384a84769b3339328550f4a194fc48a162ad4e6aee66a83aa031cff4

Contents?: true

Size: 872 Bytes

Versions: 14

Compression:

Stored size: 872 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 { defined?(ActiveSupport::Logger) }

  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

14 entries across 14 versions & 1 rubygems

Version Path
newrelic_rpm-9.5.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.4.2 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.4.1 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.4.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.3.1 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.3.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.2.2 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.2.1 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.2.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.1.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-9.0.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-8.16.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-8.15.0 lib/new_relic/agent/instrumentation/active_support_logger.rb
newrelic_rpm-8.14.0 lib/new_relic/agent/instrumentation/active_support_logger.rb