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