Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Configuring 'Expected' errors

alerts
apdex

#1

Hi,

We currently have a NewRelic ruby agent installed on our app and we use Appdex score for alerting.
We have a high frequency error class ‘ApiError’ which can spike and cause low Appdex score.

Our preference would be for the Appdex and error analytics not to take into account the ApiErrors that occurs on a 4xx http response, but keep tracking the other ApiErrors.

  1. Is this possible? I was looking at the docs for ‘marking errors as expected’ but it wasn’t clear how we’d accomplish the above use case.

  2. Also, is it possible to configure this through the server-side configuration (settings-server-side-agent-configuration) rather than through the ruby agent?

Thanks!


#2

Hello Lisa,

Thank you for reaching out.

Our preference would be for the Appdex and error analytics not to take into account the ApiErrors that occurs on a 4xx http response, but keep tracking the other ApiErrors.
Is this possible? I was looking at the docs for ‘marking errors as expected’ but it wasn’t clear how we’d accomplish the above use case.

You may ignore an error class completely via the agent config or via server-side configuration. This will cause the transaction not to appear in the transaction list and not count against your Apdex score.

However, if you want to see transaction, but not have the error count against your Apdex score. You may, as you have mentioned, mark an error class as expected. This is done via API call as detailed here:

Also, is it possible to configure this through the server-side configuration (settings-server-side-agent-configuration) rather than through the ruby agent?

Yes, it’s possible to configure Error Collection via server-side configuration. However, it’s limited to Error Class.


#3

Is there a way to provide error classes to expect in the config YAML, as is apparently possible with the Java agent, which has an expected_classes option? If not, where is this configurable server-side? I am only seeing an “Ignore from error collection” section.

Thanks.


#4

Hey, @kiranh! You can ignore error classes in your Ruby configuration file and server side settings but we do not have an expect errors config as the Java agent does.


#5

Thanks @jkinsey. That’s disappointing, given https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/manage-errors-apm-collect-ignore-or-mark-expected#expected states it’s “Available only for the Ruby and Java agents.” Is this on the roadmap? We would definitely be interested in using it.


#6

Oh my goodness, I have had my head in the Node cloud for too long. That’s the other language agent that I support.

So I gave you some wrong info, @kiranh! The Node agent doesn’t have this feature, but the Ruby agent does.

<insert facepalm here>

It’s not a serverside config or set up in the newrelic.yml; it’s enabled through the notice_error() api using the :expected option.

Here’s our documentation on that:
https://docs.newrelic.com/docs/agents/ruby-agent/api-guides/sending-new-relic-handled-errors#solution