Replicate New Relic Language Agent Error Filtering Functionality
Blog post from New Relic
New Relic provides a system for monitoring error rates by using metrics with an `error.type` attribute, which are visualized in an error rate chart on service summary pages. Errors detected in OpenTelemetry (OTel) metrics, such as `http.server.request.duration`, are marked with a status code of `ERROR`, while the Errors Inbox aids in error detection and resolution. To manage error data, New Relic offers server-side configurations that allow users to filter out certain errors, either by HTTP status code or error class, without affecting the error rate or cluttering the Errors Inbox. This approach is particularly useful for ignoring routine, non-critical errors that could otherwise inflate error rates and cause false alerts, thereby maintaining clear visibility while preserving essential trace data for debugging. Users can also configure the OTel Transform Processor to modify error data before it is exported, such as changing status codes from `ERROR` to `UNSET` and removing the `error.type` attribute, effectively reducing the error rate and preventing unnecessary clutter in the Errors Inbox. An example demonstrates a significant drop in error rate when HTTP status code 500 errors are ignored, showcasing the effectiveness of this configuration in providing accurate error monitoring.