Method: NewRelic::Agent::DistributedTracing#accept_distributed_trace_payload

Defined in:
lib/new_relic/agent/distributed_tracing.rb

#accept_distributed_trace_payload(payload) ⇒ Object

Decode a JSON string containing distributed trace properties (e.g., calling application, priority) and apply them to the current transaction. You can use it to receive distributed tracing information protocols the agent does not already support.

This method will fail if you call it after calling #create_distributed_trace_payload.

Parameters:

Returns:

  • nil


56
57
58
59
60
61
62
63
64
# File 'lib/new_relic/agent/distributed_tracing.rb', line 56

def accept_distributed_trace_payload payload
  if transaction = Transaction.tl_current
    transaction.accept_distributed_trace_payload(payload)
  end
  nil
rescue => e
  NewRelic::Agent.logger.error 'error during accept_distributed_trace_payload', e
  nil
end