You can query your distributed tracing data in several ways:
To learn about trace structure, see How distributed tracing works.
Example NRQL queries
Some example NRQL queries:
SELECT percentile(duration, 50, 95) FROM Span WHERE category = 'datastore'
AND appName = 'YOUR_APP_NAME' SINCE 4 hours ago TIMESERIES 1 minute
SELECT average(duration) FROM Span WHERE appName = 'YOUR_APP_NAME'
AND category = 'datastore' FACET host TIMESERIES 1 minute
SELECT average(duration) FROM Span WHERE appName = 'YOUR_APP_NAME'
AND name = 'FUNCTION_NAME' FACET host TIMESERIES 1 minute
SELECT histogram(duration, 10, 60) FROM Span WHERE category = 'http'
AND appName = 'YOUR_APP_NAME' FACET `http.url` SINCE 4 hours ago
SELECT average(duration) FROM Span WHERE category = 'http'
SINCE 4 hours ago FACET `http.url` TIMESERIES 1 minute
Example NerdGraph queries
You can also use NerdGraph to query your trace data using the API. For more information, see the NerdGraph distributed tracing data query examples.
Can't find data?
Having trouble finding data when querying? See Troubleshooting: missing data.