New Relic has APM language agents for C, Go, Java, Node.js, .NET, PHP, Python, and Ruby. Each of these offers several ways to leverage the power of distributed tracing:
- Quick start for standard distributed tracing (recommended): A fast way to get started
- Infinite Tracing: An advanced alternative to standard distributed tracing
- Older APM agents: Tracing options if you have older APM agents
- Manual instrumentation: Tips if automatic instrumentation doesn't work
If you want to get more background before getting started, check out these topics:
This is the best approach to set up standard distributed tracing if you haven't installed any APM agents for your services yet, or if you want to instrument additional services.
You'll need a New Relic account to set up distributed tracing. If you don't already have one, you can quickly
create a free account.
Figure out which services you want to instrument so they each send trace data to New Relic.
We have installation assistants for a variety of languages to help you instrument each service.
You should run the installation assistant for each service you want to instrument to ensure that each installation has a unique application name.
To start the assistant, click the link for your language:
This quick-start approach with the installation assistant automatically enables distributed tracing for each service you run it on, but if you already have a APM agent that you want to participate in distributed tracing, you'll need to manually enable distributed tracing. See Options for older APM agents.
After you instrument each of your services with APM agents, generate some traffic in your application so we can capture some traces. Here are two ways to view your traces in the UI:
For more help finding your traces in the UI:
Standard distributed tracing for APM agents (above) use adaptive sampling to capture up to 10 traces per minute, but if you want us to analyze all your data and find the most relevant traces, you can set up Infinite Tracing. This alternative to standard distributed tracing is available for all APM language agents except C SDK.
To learn more about this feature, see Infinite Tracing.
Before beginning, first ensure you meet the requirements.
The Infinite Tracing setup builds on the instrumentation step from the Quick start for standard distributed tracing.
The trace observer is a New Relic AWS-based service that collects and analyzes all your traces. Follow the instructions in Set up trace observer. When you're done, return here with your trace observer information and continue with the next step to configure the agent.
Infinite Tracing configuration settings include the standard distributed tracing plus information about the trace observer. Find the settings for your language agent below:
After you add the agent configuration settings, you should start seeing data in the New Relic UI. After you spend some time analyzing your data, you may want to adjust some of the features of Infinite Tracing:
- Configure trace observer monitoring
- Configure span attribute trace filter
- Configure random trace filter
If you have older APM agents, use this section to figure out if the distributed tracing features you want are supported.
Following the compatibility information is a section showing the basic configuration settings to turn on standard distributed tracing. If your older agent supports Infinite Tracing and you want to set it up, see the steps above.
Find your language agents below to confirm if you can use your existing agents with distributed tracing:
Distributed tracing is enabled through configuration settings. Review the following agent-specific sections. For general help with agent configurations, see Configure the agent.
Server-side configuration is not available for Infinite Tracing.
If you need help with proxy configuration, see Proxy support.
Recommendation: Before performing any custom instrumentation, read:
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.