newrelic-java-agent icon indicating copy to clipboard operation
newrelic-java-agent copied to clipboard

Improve HTTP error.class naming

Open kanderson250 opened this issue 1 year ago • 1 comments

Background

The agent sends HTTP errors to Errors Inbox with a variety of attributes. The attribute error.class in most cases is the HTTP status message. This is unhelpful to customers because it doesn't clearly indicate the source of the error (including that the error is HTTP, not an exception class) and we already send the status message with the attribute error.message. For instance, this is the JSON sent up by the agent when a 429 - Too Many Requests is received:

      {
        "error.expected": false,
        "traceId": "67c9124244a4d990cexxxxxxxx",
        "error.class": "Too Many Requests",
        "type": "TransactionError",
        "transactionName": "WebTransaction\/RestWebService\/status\/400 (GET)",
        "priority": 1.973573,
        "duration": 0.001,
        "nr.transactionGuid": "fee135f4exxxxxx",
        "error.message": "Too Many Requests",
        "guid": "fee135f4exxxxx",
        "parent.transportType": "HTTP",
        "nr.tripId": "67c9124244a4d990ce24411xxxxxxx",
        "sampled": true,
        "timestamp": 1703700566999
      }

Description

Come up with a better strategy for naming the error.class attribute of HTTP Error Events and implement it. Minimally this should make it clear that the source of the error is HTTP.

kanderson250 avatar Dec 28 '23 17:12 kanderson250

https://new-relic.atlassian.net/browse/NR-201118