cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Soumyapratim.Bera
AppDynamics Team

Overview  

The .NET Agent Ignore Exceptions Configuration allows you to ignore specific errors reported for a Business Transaction by adding the fully classified exception class to the .NET ignore exceptions list. This guide provides a comprehensive overview of how to configure and troubleshoot ignore exceptions for the .NET Agent. 

Contents 

Introduction  

Ignoring specific exceptions can help streamline your monitoring process by filtering out non-critical errors. This ensures that only relevant issues are brought to your attention, enhancing the efficiency of your application performance management. 

Configuration Steps 

Step 1: Identify Exception Details 

 Navigate to the BT (Business Transactions) snapshot Error Details page to find the exception details.  

Step 2: Add Exception to Ignore List

Add the Fully Classified exception class to the .NET ignore exceptions list. This configuration is applied at the controller application level and affects all registered Business Transactions. Make sure you select the .NET Tab under the Error Detection to add the Ignore exception rule. 

Step 3: Add Specific Exception Messages (Optional) 

You can specify an exception message to ignore by defining the class of an exception in the exception chain. Note that the match condition is applied only to the root exception of the chain, not to any nested exceptions.

Troubleshooting Ignore Exception Configuration

Reviewing Agent Logs

The location of the .NET Agent log files varies based on the underlying OS (Operating System): 

  • Windows:  %programdata%\appdynamics\DotNetAgent\Logs 
  • Linux:   tmp/appd/dotnet 
  • Azure Site Extension:  %home%\LogFiles\AppDynamics 

Verify Ignore Rules

Check if the ignore rule configurations from the Controller are downloaded in the AgentLog.txt entry. Look for entries like:

 

Info ErrorMonitor Setting ignore exceptions to :[System.Net.WebException]
Info ErrorMonitor Setting ignore message patterns to :[SM{ex_type=CONTAINS, ex_pattern='The remote server returned an error: (401) Unauthorized', type=CONTAINS, pattern='The remote server returned an error: (401) Unauthorized', inList=System.String[], regexGroups=[]}]

 

Locate the Exception Key

The Ignore exceptions work based on the key sent by the agent for a specific exception. In AgentLog.txt, find the Exception Key in an entry like:

 

Info ErrorProcessor Sending ADDs to register [ApplicationDiagnosticData{key='System.Net.WebException:', name=WebException, diagnosticType=ERROR, configEntities=null, summary='System.Net.WebException'}] 

 

Validating Exception Keys

Validate the exception key (e.g., key='System.Net.WebException:') entry seen in the AgentLog.txt file against the Ignore Exception configuration in your controller application. Modify/correct the configuration in your controller as needed and verify.

Sample Ignore Exception Configuration

Scenario

Let's use the System.AggregateException with an inner exception of SmallBusiness.Common.SmallBusinessException as an example. You want to ignore this exception only when the SmallBusiness.Common.SmallBusinessException has a specific message, such as "This is a known issue."

Here’s an example of how the System.AggregateException and SmallBusiness.Common.SmallBusinessException might be used in your application:

 

try 

{ 

    // Some code that might throw an exception 

    throw new System.AggregateException(new SmallBusiness.Common.SmallBusinessException("This is a known issue")); 

} 

catch (System.AggregateException ex) 

{ 

    // Handle the exception 

    Console.WriteLine(ex.Message); 

} 

 

Fully Classified Class Name

When dealing with nested exceptions as above, the fully classified class name includes both the outer and inner exceptions to uniquely identify the specific error scenario.

 

Outer Exception: System.AggregateException 

Inner Exception: SmallBusiness.Common.SmallBusinessException 

 

In this case, the fully classified class name is:

 

System.AggregateException:SmallBusiness.Common.SmallBusinessException 

 

Log Entry in Agent Log

When the exception is thrown, you see an entry in the AgentLog.txt like this:

 

Info ErrorProcessor Sending ADDs to register [ApplicationDiagnosticData{key='System.AggregateException:SmallBusiness.Common.SmallBusinessException:', name=AggregateException : SmallBusinessException, diagnosticType=ERROR, configEntities=null, summary='System.AggregateException caused by SmallBusiness.Common.SmallBusinessException: This is a known issue'}] 

 

Ignore Exception Configuration

The match condition is applied only to the root exception of the chain. Here the System.AggregateException is thrown with an inner exception of SmallBusiness.Common.SmallBusinessException and the message "This is a known issue," will be ignored by the .NET Agent. The match condition will not apply to nested exceptions' messages unless they are the root exception.

Here’s how the Ignore Exception rule would look in the Controller configuration:

 

Fully Qualified Class Name: System.AggregateException:SmallBusiness.Common.SmallBusinessException: 

Exception Message: Is Not Empty 

 

RyanParedez_0-1724386953159.png

Corresponding Configuration Entry in Agent logs:

 

Info ErrorMonitor Setting ignore exceptions to :[System.AggregateException:SmallBusiness.Common.SmallBusinessException] 

Info ErrorMonitor Setting ignore message patterns to :[SM{ex_type=NOT_EMPTY, ex_pattern='', type=NOT_EMPTY, pattern='', inList=System.String[], regexGroups=[]}, SM{ex_type=NOT_EMPTY, ex_pattern='', type=NOT_EMPTY, pattern='', inList=System.String[], regexGroups=[]}] 

 

Additional Resources

Version history
Last update:
‎08-23-2024 09:44 AM
Updated by:
On-Demand Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here