Within Dynatrace, server-side services are monitored as standalone components so that you can easily understand all service-related functionality, including all inbound and outbound requests related to each service. Dynatrace built-in service detection automatically monitors nearly all such server-side services out of the box.
Custom service detection
Custom service detection enables you to define your own service-detection rules on top of the default set of detection rules. Possible use cases for custom service detection include:
- Adding granularity when one process provides a number of different services that should be tracked as individual services
- Extending service detection to include batch jobs
Custom service detection for PHP
Custom service detection for Java and .NET has been available for some time already. With the release of OneAgent v1.133, Dynatrace now covers PHP as well.
To define a service detection rule for PHP
- Go to Settings > Server-side monitoring > Custom service detection.
- Click the PHP services tab.
- On the Edit service page, click Define PHP service and type a meaningful name for your service.
- Click Save to open the detection rule settings for the service. Each service is defined by a File name, an optional Fully qualified class name, and a Method. Going forward, each time the specified method is called within a request, the entire request will be associated with this monitored service.
Consequently, your newly defined service will appear in Smartscape, Service flows, and on its own standalone service overview page (see Service flow and service overview page examples below).
We’re currently working on Dynatrace support for PHP CLI processes. Together with custom service detection, this will enable you to define your own services for CLI processes, including batch jobs. We’ll also add auto-complete functionality, similar to what we currently have for Java and .NET. This will make the definition of custom services even easier.
Note: Custom service detection for PHP requires OneAgent v1.133 or higher.