New Relic Trace API

Gather all your tracing data in one place

New Relic's Trace API lets you send distributed tracing data to New Relic and consolidate tracing data from multiple sources into one place. We accept trace data in two formats: 

  • Zipkin format

  • New Relic format (if you don’t have Zipkin-format data, you’d use this)

Here's an example of a newrelic-format JSON post:

    curl -i -H "Content-Type: application/json" \
     -H "Api-Key: [API KEY HERE]" \
     -H 'Data-Format: newrelic' \
     -H 'Data-Format-Version: 1' \
     -X POST \
     -d '[
           {
             "common": {
               "attributes": {
                 "service.name": "Test Service A",
                 "host": "host123.test.com"
               }
             },
             "spans": [
               {
                 "trace.id": "123456",
                 "id": "ABC",
                 "attributes": {
                   "duration.ms": 12.53,
                   "name": "/home"
                 }
               },
               {
                 "trace.id": "123456",
                 "id": "DEF",
                 "attributes": {
                   "service.name": "Test Service A",
                   "host": "host456.test.com",
                   "duration.ms": 2.97,
                   "name": "/auth",
                   "parent.id": "ABC"
                 }
               }
             ]
           }
         ]' 'https://trace-api.newrelic.com/trace/v1'