lib/new_relic/agent/instrumentation/sidekiq/server.rb in newrelic_rpm-9.0.0 vs lib/new_relic/agent/instrumentation/sidekiq/server.rb in newrelic_rpm-9.1.0
- old
+ new
@@ -19,10 +19,10 @@
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']
+ ::NewRelic::Agent::DistributedTracing::accept_distributed_trace_headers(trace_headers, 'Other') if ::NewRelic::Agent.config[:'distributed_tracing.enabled'] && trace_headers&.any?
yield
end
end
def self.default_trace_args(msg)