How to Query HTTPResopnse Code and Total Count or Errors in NRQL

Is there a way to output the following request:

  • show HTTPResponseCode (all transactions with 400s/500s)

  • Total count of Error’s that had 400s/500s per day

Hi, @hiteshs: Try this:

SELECT * FROM Transaction WHERE httpResponseCode > '400'

SELECT count(*) FROM Transaction WHERE httpResponseCode > '400' SINCE 1 day ago FACET name
3 Likes

Thank you for the quick reply, Phil!

However, with that query, I’m only seeing 200 response codes, even though I do see 400s and 500s in the logs. Does this have to do with the application code?

Does New Relic APM show any data in the Error Rate chart for your application?

If not, then the errors are not being reported to APM. You may need to call a New Relic API in your application code to send the error information to New Relic.

1 Like

Hey Phil,

Thank you so much for your assistance, I’m now seeing Errors on the dashboard! :slight_smile:

2 Likes