This topic summarizes the criteria that you can use for creating custom match and exclude rules for each entry point type.
The criteria are the same for custom match and exclude rules.
If you disable automatic detection for an entry point type and then apply custom match rules, the agent discovers only requests defined by those match rules. For example, if you have a PHP MVC custom match rule that matches on “Action contains search”, and another rule that matches on "Action contains view", requests that contain "search" or "view" are the only MVC transactions that the agent detects.
On the other hand, if you do not disable automatic detection and you apply a custom match rule “Action contains search”, all the requests that match that criterion are grouped together as a single "search" transaction and then any other requests (those that do not contain “search” ) are discovered using automatic detection.
Accessing Custom Rule Configuration
- Click Configuration Instrumentation > Transaction Detection > PHP-Transaction Detection.
- Then scroll down to to either the Custom Match Rule section or the Exclude Rule section.
- Click the + to create a new rule, then select from the dropdown menu the entry point type to which the rule applies.
Matching criteria can include one or more of the following:
- HTTP method
- URI segments
- HTTP parameter (value or existence)
- HTTP header (value or existence)
- Cookie (value or existence)
See also Set Priority When Multiple Rules Apply in Custom Match Rules.
For PHP Web, if a transaction is configured to identify the entry point based on the the URI, you can optionally split the transaction into multiple transactions. For example, a login request may be automatically detected as a single transaction, but you want to split it into two transactions based on whether the request branches to a new-user or existing-user operation.
You can split a PHP Web transaction using request data from the transaction names such as URI segments, parameter values, header values, and cookie values.
PHP Web Splitting Example
For example, to split a custom match rule transaction "mobile checkout" by the mobile carrier parameter, so the agent detects separate transactions as follows:
To split transactions based upon the carrier parameter:
- On the Rule Configuration tab, set a URI match option.
- Check Split Transactions Using RequestData.
- Select Use a parameter value in Transaction names.
- Enter "carrier" for the Parameter Name.
The agent creates the following transactions: "mobile checkout.verizon", "mobile checkout.sprint", and "mobile checkout.att".
PHP Web Custom Match Rules vs Auto-Detection Rules of Other Types
If a custom match rule configured for PHP Web matches the same criteria as an auto-detection rule for a business transaction of a different transaction type in the same application, the PHP Web custom match rule takes precedence and the business transaction appears as a PHP Web transaction type.
However, if a custom match rule for PHP Web and a custom match rule for another transaction type match the same criteria, precedence depends on the values of the rules' priorities. See Setting Match Rule Priority for information on rule priorities.
By default, for most MVC frameworks, the business transaction is named using the controller:action. For modular MVC frameworks, the business transaction is named using the module:controller:action.
You can modify detection to match only a portion of the module, controller or view name (such as "Begins with" or "Contains") or on a regular expression, rather than the default which matches the entire name using "Equals" for the match condition.
You cannot configure a single match rule that matches on both the controller and the action.
PHP Web Service
By default, for Web Services frameworks, the business transaction is named for the entire web service name and the entire operation name using "Equals" for the match condition.
You can modify detection with a custom rule that matches on only the web service name or only the operation name. You can match on a portion of either name or use a regular expression.
By default, AppDynamics automatically names Drupal transactions based on the entire page callback name of the Drupal module using "Equals" for the match condition.
You can modify detection with a custom match rule that uses just a portion of the page callback name or use a regular expression.
By default, AppDynamics automatically names Wordpress transactions based on the entire Wordpress template name using "Equals" for the match condition.
You can modify detection with a custom match rule that uses just a portion the template name. or use a regular expression.
By default, AppDynamics automatically names PHP CLI transactions based on the last two segments of the script's directory path plus the name of the script.
The agent creates a business transaction instance every time the script is run.
You can modify detection with a custom match rule that matches on a different portion of the script path and name or use a regular expression.