Useful Insights Queries for before and after Release Deployment

Feel free to share your useful insights queries here that you think is useful for diagnosing any new errors and application performance after Release deployment:

I will share mine too after I figure it out.

3 Likes

Excellent idea, @icardenas! I bet @stefan_garnham has some successful queries to share! More fodder for our NRQL library!

Hi, @icardenas: If you are using New Relic APM’s deployments feature, it automatically generates a dashboard for each deployment showing response time vs. throughput, Apdex, CPU, memory, and database usage before and after the deploy, as well as a change report that shows the Apdex, response time, or throughput of each transaction before and after the deploy.

You may be able to re-create some of these charts in Insights. For example, this query displays Apdex per transaction (replace 0.4 in the apdex function with your application’s actual Apdex threshold):

SELECT apdex(duration, 0.4) FROM Transaction 
WHERE appName = 'New Relic Pet Clinic' 
SINCE '2017-12-04 21:55:00 PST' UNTIL '2017-12-04 22:45:00 PST' 
TIMESERIES 

Unfortunately, because Insights cannot yet display event markers on charts, it’s difficult to know when the actual deployment occurred. Another option is to simply display key performance metrics, and you select the time window based on when you know you did a deploy:

Finally, if you pass a custom version or build attribute from each transaction, you can say, “Show me the average response time (or Apdex, or whatever) for Build X vs. Build Y”:

P.S. — Do you notice the new feature in the above query?

5 Likes

Thanks @philweber !

Is the new feature facet’ing multiple attributes? (just answer yes or no)

1 Like

Yes! https://docs.newrelic.com/docs/insights/nrql-new-relic-query-language/nrql-resources/nrql-syntax-components-functions#sel-facet

1 Like

Awesome! That is so cool.

I’ve created a dashboard.

Is there anything else you can add here?
https://insights.newrelic.com/accounts/782377/dashboards/453912?filters=%5B%7B%22key%22%3A%22host%22%2C%22value%22%3A%22frusweb%22%2C%22like%22%3Atrue%7D%5D&now=1512698991582

1 Like

@philweber is there a way to query a unique errormessage that hasn’t occurred the days after a deployment?

You can get the number of occurrences an error message like this:

SELECT count(*) FROM TransactionError 
WHERE `error.message` LIKE 'Your message here'

But I don’t know of any way to query for something that hasn’t occurred. Maybe someone else will have a suggestion.

1 Like

I spotted the multiple facet as well :grinning:

3 Likes

@stefan_garnham Multi-attribute FACETs are now supported :grinning: :thumbsup:

3 Likes