AppDynamics Application Intelligence Platform

3.9.x Documentation

PDFs

Learn by Watching

Doc Maps

Skip to end of metadata
Go to start of metadata

The PHP Agent instruments the PHP reporting facility. PHP applications can use trigger_error to report errors through that facility. PHP extensions and PHP itself can also use the PHP facility for reporting errors.

However, the PHP Agent does not report errors that occur during an exit call but instead creates a synthetic exception for such errors.

You can configure the threshold for log messages and exceptions that the PHP agent reports as errors. You can also define exceptions that should not be included in the business transaction error count and log messages that should not be reported to the controller.

These configurations help you reduce the number of errors that the agent reports so you see just those that are most useful for monitoring and troubleshooting.

Accessing Error Detection Configuration for the PHP Agent

To Access Error Detection Configuration

1. From the left navigation pane select Configure -> Instrumentation.

2. Click the Error Detection tab.

3. Click the PHP - Error Detection tab.

Error Detection Threshold for the PHP Agent

To control the number of detected errors, you can choose the minimum threshold of errors that the agent should report from Error, Warning, and Notice.

If you select Error, the agent reports only messages and exceptions marked Error.
If you select Warning, the agent reports only messages and exceptions marked Error and Warning.
If you select Notice, the agent reports messages and exceptions marked Error, Warning and Notice.

Reporting Errors in Business Transactions for the PHP Agent

Errors in business transactions are displayed in a variety of places in the AppDynamics console:

  • In the transaction scorecards in various dashboards
  • In the Errors trend graph on the business transaction dashboard
  • In the business transaction lists
  • In error transaction snapshots
  • In the Error Transactions tab accessed from the Troubleshoot->Errors item

You can configure whether you want log messages and exceptions within the error threshold to be marked as transaction errors and counted by checking or clearing the Mark Business Transaction as error check box.

When error detection is enabled, if the Mark Business Transaction as error check box is clear, the agent reports exceptions and log messages to the controller for all errors within the configured threshold, but it does not increment the error counts and the errors per minute counts reported for the affected business transactions.

If the Mark Business Transaction as error check box is checked, detected log messages and exceptions cause the error counts to be incremented. Transaction snapshots generated for these errors are error transaction snapshots.

You can further refine which errors cause business transaction error counts to be  incremented through ignore rules. See Configuring Exceptions to Ignore.

To configure basic error detection for the PHP agent

1. Check the Detect Error check box to enable error detection. Clear the check box to disable error detection.

2. If error detection is enabled, select the minimum threshold from the dropdown list.
Errors below the threshold are not reported.

3. If you want the agent to count the business transaction that caused the error as an error transaction, check the Mark Business Transaction as error check box. If you do not want the business transactions with errors to be counted as error transactions, clear this check box.

4. Click Save Error Configuration in the top left corner of the window.

Configuring the PHP Agent to Ignore Exceptions and Log Messages

Configuring exceptions and log messages to ignore is useful for excluding a temporary known issue from the error count to avoid skewing error metrics and triggering unnecessary alerts from health rules that are based on the error count. You can configure AppDynamics to ignore specified exceptions and logged messages.

Configuring Exceptions to Ignore

You can direct the agent to ignore an exception only when the exception message contains a certain string or does not contain the string.

The ignored exception is not really "ignored". This configuration just prevents the agent from incrementing business transaction error metrics 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 error transaction. But it still detects the exception, logs the exception, and increments the exception count. The exception is still displayed 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.

Ignoring an exception simply means that AppDynamics does not increment the business transaction error count for those exceptions.

To configure the PHP agent to ignore an exception

1. Click Add New Exceptions to Ignore under the Ignored Exceptions list.

2. Enter the fully-qualified class names of exceptions to ignore, separated by colons.

Exception chains are supported. If you specify "A:B" as the exception chain, the agent matches any chain where B is in the chain of A, even if B is not an immediate cause of the exception.

3. Optionally, further qualify the exceptions to ignore by configuring a match condition for the exception message. Enter the string to match and the qualifier from the dropdown list (Equals, Contains, Starts with, Ends with, Matches Reg Ex).

The RegEx operation uses PHP's built-in PCRE regular expression engine and requires the same syntax, including delimiters (for example: /^Foo/). See the PCRE Manual for help matching a regular expression.

Click the gear icon to configure the NOT condition for the match.

4. Click Save.

5. Click Save Error Configuration in the top left corner of the window.

You can later edit or remove the ignore rule by clicking it in the Ignored Exceptions list.

Configuring Logged Messages to Ignore

When a log message that has been configured to be ignored is logged, the PHP agent does not report the message to the controller.

To configure the PHP agent to ignore a log message

1. Click Add under the Ignored Messages list.

2. Enter the string to be matched in the message and the qualifier from the dropdown list (Equals, Contains, Starts with, Ends with, Matches Reg Ex).

The RegEx operation uses PHP's built-in PCRE regular expression engine and requires the same syntax, including delimiters (for example: /^Foo/). See the PCRE Manual for help matching a regular expression.

Click the gear icon to configure the NOT condition for the match.

3. Click Save.

4. Click Save Error Configuration in the top left corner of the window