General availability of PHP deep monitoring!

Dynatrace is proud to announce general availability of PHP deep monitoring. New customers receive PHP support automatically when they install Dynatrace.

For existing customers, to enable PHP monitoring:

  1. Upgrade to OneAgent v1.89 or higher.
  2. Go to Settings > Monitoring > Monitoring Technologies.
  3. On the Dynatrace supported technologies tab, set the PHP monitoring switch to On.

What you get with PHP deep monitoring

Following restart of the Apache web server that runs PHP, select a web request service for analysis. Once the service receives a PHP request you’ll see a small PHP logo appear next to the Apache logo. Depending on what your PHP code does, once PHP monitoring is successfully enabled you may notice that your Apache web request service now calls Databases and/or other services that are called from within PHP.

PHP_14

Now select a PHP request from the Top web requests list. On the following page, click the View response time hotspots button.

PHP_14

PHP response time analysis and code-level visibility

Notice that you get database requests now—every single SQL statement executed from within PHP is available, just as it is with Java, .NET, and Node.js. If your PHP code makes HTTP requests to other systems, you’ll see those as well.

PHP_14

Click any statement to view more details.

PHP_14

Supported databases

Dynatrace currently supports the following databases in PHP:

Code-level visibility

In the Average response time infographic, click Self time to view the breakdown of your request’s code-level timings. Notice that PHP execution is now a clickable link you can use to view method-level hotspots in your PHP code.

If you’re only interested in why your service consumes a lot of CPU, and not in the response time, you can analyze CPU consumption directly.

PHP compilation times

Dynatrace also shows you if your PHP requests spend too much time in compilation.

PHP deep monitoring

PHP error analysis

If any of your PHP requests has an increased failure rate you can analyse it by clicking the View details of failures button underneath the failure rate chart.

  1. The return code of each failed request is displayed. A No response message is displayed if an error broke PHP execution completely. In the example below, you can see that all requests failed because of a die or exit function in the PHP code.
  2. Click Details to view the message and access code-level view.

PHP deep monitoring

When a die or exit function doesn’t include a message, the exit code is displayed instead.

PHP deep monitoring

What about FPM and Nginx?

Dynatrace automatically injects into FPM and fully supports Nginx/FPM and any other FPM setup. Dynatrace automatically tracks all calls from your Nginx to the specific FPM pool.

Each FPM pool is its own service. In the example below, the pool named www hosts a Magento store. As you can see, Dynatrace automatically discovers all requests and identifies the most CPU-intensive and slowest requests

Supported environments

On Linux, Dynatrace supports PHP 5.3 and above. Dynatrace supports FPM in combination with any WebServer and of course mod_php in the Apache web server.

Those who know me know that I'm passionate about 3 things: rock climbing, physics, and performance. I've worked in performance monitoring and optimizations in enterprise environments for the better part of the last 10 years. Now as a Product Manager I am doing my best to build those experiences into Dynatrace.

Looking for answers?

Start a new discussion or ask for help in our Q&A forum.

Go to forum