New Relic provides an events-to-metrics service that lets you generate metric data from your event data and log data. Metrics are aggregates of your event and/or log data and are optimal for analyzing and monitoring trends over long time periods.
Now you can use the percentile()
function to return an attribute's approximate value at a given percentile. To do so, create an events-to-metrics NRQL query rule using the distribution metric type. The distribution metric type creates a distribution metric data point for each time window (currently 1 minute).
Example: SELECT distribution(duration) AS 'service.responseTime' FROM Transaction WHERE appName = 'Data Points Staging' FACET name, appName, host
Once you’ve created your distribution metric type, you can query your desired percentile as follows:
SELECT percentile(service.responseTime, 95) FROM Metric