Sha256: 5dfb4d951aeeb490c3c34fcbed867320756bde15808566f3a1612d73cdebe48c
Contents?: true
Size: 1.07 KB
Versions: 11
Compression:
Stored size: 1.07 KB
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 if NewRelic::Agent.config[:'sidekiq.capture_params'] NewRelic::Agent.add_custom_parameters(:job_arguments => msg['args']) end 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
11 entries across 11 versions & 1 rubygems