This page describes transaction detection and configuration procedures that related specifically to the PHP Agent. See Transaction Detection Rules.
PHP Entry Points
The entry point is where the business transaction begins, typically a URI or a page callback name, MVC controller action, page template name, or page template. The PHP Agent automatically detects and monitors the entry point types listed under PHP Frameworks and Protocols in PHP Supported Environments.
If the agent cannot detect the framework, the entry point type defaults to PHP Web. PHP Web automatically detects all HTTP requests to the application.
Enable Monitoring by Entry Point
You can enable and disable transaction monitoring for each entry point type.
When monitoring is disabled, the agent stops counting, measuring, and recording all activity on servers of that type.
Enable or disable monitoring by checking or clearing the Transaction Monitoring checkbox in the Transaction Detection panel for the PHP entry point type.
By default, PHP Agent names transactions are named after the first two segments in the service request URL. You can modify the default naming scheme in the same manner as for any web-based business transaction entry point.
For PHP-based entry point tiers that use a multi-layered framework architecture, the last framework that processes the transaction determines the name of the PHP business transaction. For example, for an incoming request processing path of PHP Web > MVC > Drupal 8, a new business transaction would be named based on the Drupal 8 invocation rather than the preceding layers in the request processing flow.
Virtual Host Naming by Entry Point
If you have multiple virtual hosts configured on a single web server, you can differentiate among the business transactions by adding the virtual host name as a prefix to the default business transaction name. Enable use of the prefix by checking the Use Virtual Host in Business Transaction names checkbox in the Transaction Detection panel for the PHP entry point type. Transactions discovered and named subsequent to this configuration will use the virtual host name as a prefix to the default name.
For example, an application has two exit.php actions running on the same physical host. One action runs on a virtual host named
phpagent1 and the other runs on a virtual host named
phpagent2. Transaction naming will occur as follows:
- virtual host name is not used: agent identifies all requests to exit.php as a single business transaction named
- virtual host name is used: agent identifies requests as two different business transactions named
phpagent1 : exit.phpand
phpagent2 : exit.php
Customize Transaction Detection and Naming
If the default contentions do not produce transactions to fit your needs, you can change the transaction configuration as follows:
- Create exclude rules to eliminate entry points that you do not need to monitor.
- Create custom match rules that specify matching rules for identifying and naming transactions.
- For PHP Web entry points, you can also configure transaction naming.
To access the transaction detection panes, select Configuration > Instrumentation > Transaction Detection > PHP-Transaction Detection.