What is the NRQL query to generate the segmented response time time series like the one which is shown below?
I tried various queries but was not able to get the desired results?
The New Relic documentation helps a lot: https://docs.newrelic.com/docs/insights/nrql-new-relic-query-language/using-nrql/introduction-nrql#syntax
But the query you are looking for will be something like this:
SELECT average(duration) from Transaction where appId = <appId> since 30 minutes ago where transactionType = 'Web' TIMESERIES 1 minute
You can generate query from the chart, for my newrelic data I can use this NRQL
SELECT filter(average(apm.service.overview.web * 1000), WHERE segmentName like 'Python') as 'Python',filter(average(apm.service.overview.web * 1000), WHERE segmentName like 'MySQL') as 'MySQL',filter(average(apm.service.overview.web * 1000), WHERE segmentName like 'Redis') as 'Redis',filter(average(apm.service.overview.web * 1000), WHERE segmentName like 'Web external') as 'Web external' FROM Metric WHERE (entity.guid = 'YOUR GUID') LIMIT MAX SINCE 1800 seconds AGO TIMESERIES