- Catch errors that New Relic does not instrument by default.
- Ignore errors that you don't want reported at all.
- Filter out noise from expected errors so you can focus on the errors that are affecting performance. (Java and Ruby agents only)
Collect errors not instrumented by default
New Relic APM agents include API calls to report (or "notice") errors. These are useful when New Relic does not instrument your framework automatically or when there are particular errors that New Relic is not catching for your supported framework.
To learn how to get an APM agent to report an error, see the agent-specific API documentation:
- C SDK:
Sometimes the APM agent instruments an error that you don't want reported, such as errors that contain sensitive information like user login errors. If you don't want an error to report to the New Relic collector, you can ignore the error, and the APM agent discards the error entirely.
For Java, Ruby, and Node.js: If you want to report errors to APM but don't want those errors to affect your Apdex or error rate, mark them as expected instead.
There are two ways to ignore errors: through the agent configuration or through server-side configuration in the UI:
- Ignore errors using server-side configuration in the UI
This option depends on whether the agent supports server-side configuration.
- If it is not already enabled, enable server-side configuration.
- Go to the Server-side configuration menu for the application that has errors that you want to ignore.
- Under Error collection, look for Ignore from error collection. Add the HTTP code or the Error class for the errors that you want to ignore.
- Select Save server-side configuration.
- Ignore errors using agent configuration
To ignore an error using the agent configuration, see the configuration documentation for your agent:
- C SDK: Not available. For more information, see the C SDK errors example on GitHub.
error_collector.ignore_status_codes. For additional information, see Java agent error configuration.
Expected errors (Java, Node.js, and Ruby only)
For the Ruby and Java agents, you can mark errors as expected. These errors will be reported to APM and available for viewing, but they won't affect the Apdex or error rate (or alert conditions based on error rate).
To configure errors as expected, see the agent-specific documentation:
If expected errors are enabled, APM's Error analytics page will, by default, have a filter applied with the
error.expected attribute set to
false, meaning expected errors will not be displayed. To view expected errors, turn off the
To view expected errors, use New Relic Insights:
- To view Insights charts for expected errors, create a query for the
- To create alert conditions for NRQL queries, use the
View errors in the UI
Among other places, error data appears in these parts of the New Relic UI:
- Error analytics page: shows in-depth charts and visual analysis of errors.
- APM Overview page: shows a high-level view of your application, which includes errors.
- Alert conditions: can be based on error rate.
transactionErrorevent in New Relic Insights: contains underlying error data, which can be used in NRQL queries.