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

Custom Exceptions in the New Relic didn't occur



Hello! I need some help with notice custom exceptions!
When some error occurs we wrap this one in our custom exception to better understand the reason for the exception in the new relic.
But we see only system exceptions in errors dashboard, something like this:
Error message System.NullReferenceException: Object reference not set to an instance of an object.
I’ve tried to send to the New Relic some custom exception with inner custom one too:

var newInnerExToTest = new MyInnerExceptionToTestThisBug("New Inner Ex Test Message", new Exception("Main system exception to understand weird behaviour"));
var parentEx = new MyCustomToTestThisBugException("New parent Ex Test message", newInnerExToTest);
NewRelic.Api.Agent.NewRelic.NoticeError(parentEx, exceptionData);

But in New Relic I’ve seen only this one -> new Exception(“Main system exception to understand weird behaviour”)
i.e only system exception
What is the reason for this?


Hello @dpavliuchenko! This is Reese with the New Relic Support team.

To start, can you let me know which agent version you are running?

Currently, this is expected behavior - the innermost exception is reported as this is the most useful in terms of understanding what ultimately caused the error.

In older agent versions, when an exception has inner exception(s), ignored error configuration was handled differently: whether an error was automatically noticed by agent instrumentation versus whether it was noticed when a customer used the NoticeError API.

Errors noticed by agent instrumentation:

  • Ignored error configuration would compare the outermost exception to the list of configured ignored errors.

Errors noticed by the NoticeError API:

  • Ignored error configuration would compare the innermost exception to the list of configured ignored errors.

If you are running the latest agent version (v8.25), errors noticed by agent instrumentation now behaves the same as errors noticed by the NoticeErrorAPI. This means that both paths inspect the innermost exception when deciding whether to ignore the exception or not.

There are some customers who would prefer the ignore error configuration to consider the outermost exception. Currently, customers will experience this behavior no matter how an exception is noticed.

Currently, we have it on the roadmap to implement a fix that would inspect both the innermost and outermost exception when deciding whether to ignore an error. This behavior should be the same whether the agent noticed the error or the error was notice via the API.

I hope this helps. Let me know if you have any further questions!


Hey @reeselee! Thanks for the answer, it’s really helpful!
We used version but I’m going to update it to latest stable 8.25.214


Hi @dpavliuchenko,

You are welcome! And, sounds good. Have a delightful weekend!