Sha256: cf178f105947221c1a5ad8a1a5446492e04009fc895821fdfe4a315b5f838291
Contents?: true
Size: 938 Bytes
Versions: 23
Compression:
Stored size: 938 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. DependencyDetection.defer do @name = :sidekiq depends_on do defined?(::Sidekiq) && !NewRelic::Agent.config[:disable_sidekiq] end executes do ::NewRelic::Agent.logger.info 'Installing Sidekiq instrumentation' end executes do class NewRelic::SidekiqInstrumentation include NewRelic::Agent::Instrumentation::ControllerInstrumentation def call(worker, msg, queue) perform_action_with_newrelic_trace( :name => 'perform', :class_name => msg['class'], :category => 'OtherTransaction/SidekiqJob') do yield end end end Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add NewRelic::SidekiqInstrumentation end end end end
Version data entries
23 entries across 23 versions & 1 rubygems