Introducing custom service detection for PHP

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

  1. Go to SettingsServer-side monitoring > Custom service detection.
  2. Click the PHP services tab.
    Set up custom service detection for PHP
  3. On the Edit service page, click Define PHP service and type a meaningful name for your service.
  4. 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).

What’s next

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.

Daniel has over 17 years experience as a full-stack developer, architect, and technical lead in the field of web engineering where he's used his strong problem-solving skills in hundreds of projects. He is passionate about continuous learning, using new technologies, and sharing his discoveries with others. As a Technical Product Manager at Dynatrace, Daniel focuses on cognitive services and monitoring web technologies.