Question

Some resources of my web application return responses with 404 status code on regular basis, these are not errors at all. But NewRelic states them as errors and if there are significant number of these responses per minute, the error alert is fired.

  • I can ignore all 404 responses through error_collector configuration but I don't want to disable all 404's in app

  • I can ignore whole request by calling ignoreTransaction() in NewRelic Agent API, but I don't want to remove those requests from statistics.

Basically, I want to find way to ignore some resources from error collecting.

Is there a way?

Was it helpful?

Solution

As you mentioned, you can ignore all 404s or you can ignore the entire transaction but you can't ignore errors on the fly with the Java agent API. Probably the best compromise would be to ignore the error in question through configuration, but then in your application's logic use the API call NewRelic.NoticeError to capture the errors that you want to contribute to your error rate. In other words, use NoticeError for the errors you don't want to ignore.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top