AppDynamics Application Intelligence Platform

3.8.x Documentation

PDFs

Videos

Release Notes

You can configure which errors AppDynamics detects and which it ignores.

What is an Error?

Metrics on errors are collected in addition to normal business transaction metrics.

An error is defined as one of the following:

  • An unhandled exception in the context of a business transaction.
    For example:
    • Business transaction entry point -> some code -> some exception thrown -> business transaction finished -> exception caught. In this case AppDynamics reports the exception.
    • Business transaction entry point -> some code -> some exception thrown -> exception caught inside a business transaction -> business transaction finished. In this case AppDynamics does not report the exception.
    (info) If a business transaction experiences an error, it is counted as an error transaction and not as a slow, very slow or stalled transaction, even if the transaction was also slow or stalled. 
  • Any error that is logged with a severity of Error or Fatal using Log4j or java.util.logging (in Java), and Log4Net/NLog (in .NET) even if occurs outside the context of a business transaction. Depending on the signature of the method being called, you might not see an exception stack trace:
    • logger.log(Level.ERROR, String msg, Throwable e) - stack trace available
    • logger.log(Level.ERROR, String msg) – no stack trace here
  • Any exception that occurs during an exit call, for example while calling SQL, a web service, or a message queue server.

Configuring Error Detection

You can configure:

The error detection configuration is applied to all tiers in the application.

Always remember to click Save Error Configuration after you have made any changes.

 

Configuring Error Detection Using Calls to Loggers

By default AppDynamics instruments calls to loggers using common platform specific loggers. AppDynamics captures any exception stack trace and automatically correlates it with the request.

To configure error detection using logs with Java

For details about the Java logging APIs see Java Logging. By default, AppDynamics can instrument calls using Log4j and java.util.logging.To instrument calls using other loggers, see Custom Logger Definitions.

1. Click Configure -> Instrumentation.

2. Select the Error Detection tab.

3. Click the Java - Error Detection tab.

3. Select where you want AppDynamics to look for log messages and exceptions.

  • To mark as an error transaction any business transaction for which messages at ERROR level or higher are logged, check the Mark Business Transaction as error checkbox
  • To exclude business transactions for which specific messages are logged from being marked as error transactions, check the checkbox and add the messages that you want to exclude in the Ignored Messages list below.
  • To not mark any business transactions as error transactions, clear the checkbox.

Messages logged as higher than ERROR would include more severe levels such as CRITICAL or FATAL.

4. Click Save Error Configuration.

To configure error detection using logs, system trace, and event logs with .NET

By default, AppDynamics can instrument calls using NLog and Log4Net. It can also gather information from System Trace and the Event Log. To instrument calls using other loggers, see Custom Logger Definitions.

1. Click Configure -> Instrumentation.

2. Select the Error Detection tab.

3. Click the .NET - Error Detection tab.

3. Select where you want AppDynamics to look for log messages and exceptions.

  • To mark as an error transactions any business transactions for which messages at ERROR level or higher are logged check the *Mark Business Transaction as error checkbox
  • To exclude business transactions for which specific messages are logged from being marked as error transactions, check the checkbox and add the messages that you want to exclude in the Ignored Messages list below.
  • To not mark any business transactions as error transactions, clear the checkbox.

Messages logged as higher than ERROR would include more severe levels such as CRITICAL or FATAL.

4. If you do not want system trace or event log errors to be monitored, check the appropriate box.

  • System trace errors are anything written as an error message to the Listeners collection via TraceError.
  • Event log errors are anything written to the EventLog when the type is set to error. For example:
myEventLog.WriteEntry(myMessage, EventLogEntryType.Error, myID);

5. Click Save Error Configuration.

To configure error detection using logs with PHP

By default, AppDynamics can check for PHP errors using multiple thresholds.

1. Click Configure -> Instrumentation.

2. Select the Error Detection tab.

3. Click the PHP - Error Detection tab.

3. Select the appropriate error threshold (Notice, Warning, or Error) from the dropdown menu.

  • To mark as an error transactions any business transactions for which messages at the chosen level or higher are logged, check the Mark Business Transaction as error checkbox
  • To exclude business transactions for which specific messages are logged from being marked as error transactions, check the checkbox and add the messages that you want to exclude in the Ignored Messages list below.
  • To not mark any business transactions as error transactions, clear the checkbox.

4. Click Save Error Configuration.

Configuring Error Detection Using Custom Loggers 

To configure AppDynamics to look for errors from a custom logger, create a custom logger definition. Custom loggers are supported in Java and .NET.

To define a custom logger

1. On the right side of the Definition panel, click Add Custom Logger Definition.
The Custom Logger Definition window opens.

2. Enter a name for the custom logger.

3. Check the Enabled check box to enable it.

4. Use the drop-down menu and text field to define the logger's class.

5. Enter the name of the method that implements the logger.

6. Click Add Parameter to add a parameter to the logger. The Param list appears.

7. In the appropriate Param Index field, enter the fully qualified class name for each parameter.

8. Repeat steps 6 and 7 as necessary to define all of the logger method's parameters.

9. In the Exception Parameter field, enter the zero-based index of the parameter for the exception object.
This index can be any type of Object, including Arrays. If the Object is not null, AppDynamics converts the Object to a string to report the error details.
(info)   A custom logger only marks a BT as an having an error if there is a non-null exception object passed to the logger method.

10. Click Save.

The following screenshot shows a logger definition for a method with two parameters. It uses the array parameter to describe the exception.

The next screenshot shows a logger definition for a method with one parameter. It uses a string parameter to describe the error details.

Configuring Errors based on HTTP Response Codes

In Java and .NET, you can configure errors based on HTTP response codes.

HTTP response codes can convey errors that occur while the application is serving user requests as well as business application errors.

For example, a 404 error is a page not found error whereas a 430 error might represent an item out of stock situation.

By default, AppDynamics captures all HTTP error codes from 400 to 505. If the error code is set as part of a business transaction, the transaction is marked as an error. You need to configure error custom codes ranges and custom error codes with custom descriptions.

The following figure shows the error configuration for ACME Online store. This configuration causes AppDynamics to detect the Inventory Empty Error and Custom Error codes.

To ignore an error code if you do not want it to appear, add it to the list by creating a custom error code range and then disable that error code by clearing its Enabled checkbox.

Configuring Error Redirect Pages

In Java and .NET you can configure errors based on custom error pages.

Applications can use custom redirect pages to identify application errors.

To specify a redirect page, click Add Error Redirect Page.

In this example, whenever an error in the system redirects to "AcmeErrorPage.jsp", AppDynamics logs an error.

Configuring Exceptions and Log Messages to Ignore

Configuring exceptions and log messages to ignore is useful for excluding a temporary known issue or any other exception you don't care about from the error count. This avoids skewing error metrics and triggering unnecessary alerts from policies based on the error count. You can configure AppDynamics to ignore specified exceptions and logged messages.

In the case of exceptions, when you configure an exception to be ignored, AppDynamics still detects the exception, logs the exception, increments the exception count, and displays the exception in the Exceptions subtab of the Errors tab of the tier and node dashboards and in the Summary and Error Details sections of any transaction snapshot that was in progress when the exception occurred. However, the status of the User Experience header in the transaction snapshot Summary would not be marked as ERROR. Ignoring an exception simply means that AppDynamics does not increment the business transaction error count for errors caused by exceptions that have been configured to be ignored. When an ignored exception occurs, AppDynamics does not count the business transaction in which the exception occurred as an error.

To define an exception to ignore

1. Click Add New Exception to Ignore.  

The Configure dialog pops up.

2. Enter the fully qualified class name for the exception.  You can use a colon (:) to separate multiple names.

(info) If you don't need to filter for specific messages in the exception, select "Is Not Empty". If you want to filter for Null, select "Is Not Empty" and use the gear icon to select NOT.  This sets the condition to not(notempty), that is "empty".

3. To filter for specific messages, define the message to be matched.  For example, you can direct AppDynamics to ignore an exception only when the exception.getMessage() call contains the string "format", or does not contain the string "format".

4. To filter for specific nested exceptions, list the entire exception chain. The following configuration directs AppDynamics to ignore all java.lang.Runtime exceptions that wrap a javax.sql.SQLException. Other types of java.lang.Runtime exceptions will not be ignored.

5. To filter for both nested exceptions and specific messages, specify both.The next configuration defines the exceptions to ignore more narrowly. It directs AppDynamics to ignore all java.lang.RuntimeExceptions that wrap a javax.sql.SQLException only when the exception.getMessage() call contains the string "format".

4. Don't forget to Save your changes.

To configure a logged message to ignore

1. Click Add

The Create dialog pops up.

2. Specify a match condition for log messages to ignore.

3. In .NET and Java, you can also specify that errors logged with certain loggers or logger categories be ignored. Click Add New Category/Logger to Ignore.

Learn More

1 Comment

  1. Unknown User (r.knochenhauer@t-systems.com)

    if I want to define ignored message which includes "space", do I have to define the string with quotes ("")? like "user already exists" instead of user already exists.