Support for W3C Trace Context: Available in all Infinite Tracing agents and in standard distributed tracing agents as noted
Once you find the agent version with the features you want, follow the links for help installing or updating your agent. For best results, update existing agents to the latest version.
Your JVM's networkaddress.cache.ttl security setting must not be set to forever (i.e. -1). For more information about this networking property, please visit the Oracle Network Properties docs.
If you want to enable Infinite Tracing, see Set up trace observer. When you're done, return here to complete the next step of configuring the agent to send data to the trace observer.
Step 3. Configure the agent
Distributed tracing is enabled through configuration settings. Review the following agent-specific sections. If you're enabling Infinite Tracing, there are different configuration options for that. For more about agent configuration, see Configure the agent.
Important
Server-side configuration is not available for Infinite Tracing.
If a service is not passing the trace header to other services, you can use the distributed tracing payload APIs to instrument the calling service and the called service. The calling service uses an API call to generate a payload, which is accepted by the called service.
To instrument the calling service:
Ensure the version of the APM agent that monitors the calling service supports distributed tracing.
Ensure the version of the APM agent that monitors the called service supports distributed tracing.
If the New Relic agent on the called service does not identify a New Relic transaction, use the agent API to declare a transaction:
One way to tell that a transaction is not in progress: when newrelic_create_distributed_trace_payload() is called, a NULL pointer is returned. To solve this problem, follow the procedures to create a transaction with the C SDK.
One way to tell that a transaction is not in progress: when Transaction.InsertDistributedTraceHeaders(h http.Header) is called, no headers are inserted. To create a transaction, see Instrument Go transactions.
One way to tell that a transaction is not in progress: when Transaction.insertDistributedTraceHeaders(Headers) is called, no headers are inserted (this API requires agent 6.4.0+). To create a transaction, see Java agent transaction-related APIs.
One way to tell that a transaction is not in progress: newrelic_insert_distributed_trace_headers() returns false. To create a transaction, see newrelic_start_transaction.
To tell that a transaction is not in progress: when transaction = current_transaction() is run, transaction is None. Or, if result = accept_distributed_trace_payload(payload) is run, then the result is False.
If you are using a Rack-based web framework and have enabled New Relic's Rack instrumentation, the Ruby agent will handle starting a transaction for you. For other use cases, see the add_transaction_tracer API method.
Extract the payload from the call that you received (for example, in a header).