lib/new_relic/agent/instrumentation/sidekiq.rb
def call(worker, msg, queue, *_)
          trace_args = if worker.respond_to?(:newrelic_trace_args)
            worker.newrelic_trace_args(msg, queue)
          else
            self.class.default_trace_args(msg)
          end
          trace_headers = msg.delete(NewRelic::NEWRELIC_KEY)

          perform_action_with_newrelic_trace(trace_args) do
            NewRelic::Agent::Transaction.merge_untrusted_agent_attributes(msg['args'], :'job.sidekiq.args',
              NewRelic::Agent::AttributeFilter::DST_NONE)

            ::NewRelic::Agent::DistributedTracing::accept_distributed_trace_headers(trace_headers, "Other") if ::NewRelic::Agent.config[:'distributed_tracing.enabled']
            yield
          end
        end
# Client middleware has additional parameters, and our tests use the
# middleware client-side to work inline.
Client middleware has additional parameters, and our tests use the
middleware client-side to work inline.
Client middleware has additional parameters and our tests use the middleware client - side to work inline .
def call(worker, msg, queue, *_)
          trace_args = if worker.respond_to?(:newrelic_trace_args)
            worker.newrelic_trace_args(msg, queue)
          else
            self.class.default_trace_args(msg)
          end
          trace_headers = msg.delete(NewRelic::NEWRELIC_KEY)
          perform_action_with_newrelic_trace(trace_args) do
            NewRelic::Agent::Transaction.merge_untrusted_agent_attributes(msg['args'], :'job.sidekiq.args',
              NewRelic::Agent::AttributeFilter::DST_NONE)
            ::NewRelic::Agent::DistributedTracing::accept_distributed_trace_headers(trace_headers, "Other") if ::NewRelic::Agent.config[:'distributed_tracing.enabled']
            yield
          end
        end
def call ( worker , msg , queue , * _ ) trace_args = if worker . respond_to? ( :newrelic_trace_args ) worker . newrelic_trace_args ( msg , queue ) else self . class . default_trace_args ( msg ) end trace_headers = msg . delete ( NewRelic :: NEWRELIC_KEY ) perform_action_with_newrelic_trace ( trace_args ) do NewRelic :: Agent :: Transaction . merge_untrusted_agent_attributes ( msg [ 'args' ] , :' job.sidekiq.args ' , NewRelic :: Agent :: AttributeFilter :: DST_NONE ) :: NewRelic :: Agent :: DistributedTracing :: accept_distributed_trace_headers ( trace_headers , "Other" ) if :: NewRelic :: Agent . config [ :' distributed_tracing.enabled ' ] yield end end
Client middleware has additional parameters, and our tests use the
middleware client-side to work inline.
Client middleware has additional parameters and our tests use the middleware client - side to work inline .
worker
msg
queue
_