New Relic's Trace API is used to send distributed tracing data to New Relic: either our own generic format or Zipkin data format. This API is also how trace data from some of our integrations and exporters is reported to New Relic.
To get started quickly, go to Start reporting data.
Why use the Trace API
The Trace API makes it easy to consolidate distributed tracing data from multiple instrumentation sources in New Relic. This API is a web service that sends trace data to New Relic using POSTs to our HTTP endpoint.
You can use the Trace API directly but it's also the way trace data gets into New Relic from these sources:
- Some of our open source integrations, like the OpenCensus and Istio exporters.
- Our Telemetry SDKs: Ensure best practices when sending us data by using these client libraries built on top of our data-ingest APIs.
Reasons to use the Trace API:
- You have your own custom distributed tracing tool and want to see that data in New Relic without changing your instrumentation.
- You want to report distributed tracing data to New Relic without the use of our installed solutions.
- You use Zipkin and want to see that data in New Relic without changing your instrumentation.
In the future, New Relic will provide integrations for open-source tracing tools besides Zipkin (like the OpenCensus exporter).
Want to understand how trace data fits in with other New Relic data? Read about our data types.
Requirements and limits
For requirements and rules that apply to the entire Trace API, for all trace data types, see Trace API rules and limits.
Start reporting data
The Trace API accepts trace data in these two JSON formats:
zipkin: the Zipkin JSON v2 trace data format (learn what Zipkin is).
newrelic: our general format. If you don't have Zipkin-format data, use this.
Get started sending data:
Having problems getting data to report? See Troubleshooting.
You can find data sent via the Trace API, or from integrations that use this API, in these locations:
- In New Relic One: For details, see distributed tracing UI.
- By querying: For details about how to query and create custom charts, see Query distributed tracing data.
Potential next steps:
- Learn more about how distributed tracing works and the data structure.
- Decorate span data with custom attributes.
- Use our GraphQL-based NerdGraph API to programmatically query your trace data.