PHP Application Monitoring with Instana

Introducing PHP Support from Instana

PHP is one of the most popular and widely used scripting languages on the web. From it’s inception as “Personal Homepage Tools”, it has evolved to a versatile general purpose language powering everything from blogs, CRMs, eCommerce shops, online games and enterprise applications. This wide range of applications made PHP a logical choice for Instana to provide support.

Automatic Discovery of PHP infrastructure

As part of our Application Performance Management solution, Instana automatically discovers PHP running (as PHP-FPM, PHP-CGI and Apache’s mod_php Server APIs) and installs our distributed tracing technology for it. Like everything else in Instana, this installation is automated, requiring zero configuration effort.

If your server runs PHP, we will find, instrument and monitor it.

All versions of PHP starting from PHP 5.3 are supported, including the newly released PHP 7.1. This includes 32-bit and 64-bit PHP, and also covers PHP compiled with and without Zend Thread Safety (ZTS).

PHP-FPM Monitoring

For PHP-FPM, we provide live insights into its configuration and collect metrics for any configured worker pools, including accepted connections, slow requests, active and idle processes, and memory consumption. All metrics are collected at 1-second granularity.

PHP Monitoring Dashboard

We are also monitoring the health of your PHP-FPM Servers, watching for typical production issues, like when PHP-FPM has too many pending or slow requests, connection resets or worker pool restarts.

Automatic Discovery of PHP services

Instana’s PHP performance monitoring system traces requests on your servers to discover the entry points to all PHP services in your application and displays them in the Application Map. Entry points connected to any other services or infrastructure (such as databases or message queues) are also mapped. Like any other component, the comprehensive view of your application links the physical and logical layers together, and shows traffic flow in real time.

PHP Application Map

We automatically collect key performance indicators (KPIs) for these services, like average latency, error rate, requests per second and available instances to make sure you’re alerted to any potential service health issues.

Discovery is fully automatic and continuously aligned with changes based on the real-time architecture of how requests are handled within the Application. Staying true to the Instana experience, there is no manual dashboard building or configuration required. However, we also offer a tool to tailor service discovery to your business domain if needed.

PHP Service Map

Instana’s PHP monitoring traces every incoming request to your application, measuring the execution time, memory consumption and any additional interesting information about the request. Instana traces every incoming PHP request to your application, measuring the execution time, memory consumption and any additional interesting information about the request. This includes all outgoing calls made via PDO, ext/mysqli, ext/mysql, IBM DB2, OCI, MongoDb, Predis, Memcached, cURL, pecl_http and any calls made via the HTTP streaming API. Your code does not need to be changed for this. It just works.
PHP Trace Request Screen

Support for further automatic introspection into various major frameworks, like Symfony, Laravel and Zend Framework, is scheduled for a late 2017 release. We will also add support for popular shop systems, like Magento, Shopware and Oxid, and offer an SDK for custom instrumentations.

Instana’s primary use case is production monitoring. While the sample rate of the tracing can be adjusted to a lower rate, our extension is very lightweight and there is no technical reason to trace less. We achieve this by intercepting a selected few function calls within the PHP engine and yielding control back to the original program flow very early. Unlike profilers, this approach produces minimal overhead and makes Instana PHP tracing suitable to be always enabled for production sites.

Finding PHP code problems in production using Instana

Because Instana‘s tracing is distributed end-to-end tracing, our traces contain calls from the requesting user’s browser across your entire monitored service landscape. This will give you a complete overview of the path the request took through your various service endpoints. For microservice architectures, this includes those written in other languages, like Java, Ruby, Node.js or .NET. This makes it easy to pinpoint where specific bottlenecks are.

If Instana detects errors during execution of monitored calls, the corresponding spans in the trace will be marked with an error and contain the full backtrace for this request. Instana offers a configurable backchannel into your code, which makes getting to the offending line of code as simple as a single click.

PHP Tracing Span

This way, you can start troubleshooting immediately and have almost the entire context of the request available to you, directly from your production environment. And with our TimeShift feature, you can even select a past timeframe when an error happened to see the exact state of your application at that time (form the physical infrastructure, to the logical components and down to the trace).

PHP Drill-down for debugging

As I’ve mentioned, deployment is automatic. Try it for yourself and see what your PHP Applications are doing today. Want to dig in even deeper – read the technical PHP Monitoring documentation at

Play with Instana’s APM Observability Sandbox

Engineering, Product
At Instana, we believe that Observability should be as automated as possible. We often joke with each other about automagic. From the birth of Instana, we relentlessly invested in the creation of...
Customer Stories
Innovation is embedded in TIH Investment Holdings’ DNA. From launching Auto & General Insurance in 1985, to launching an initiative to assist Black-owned Exempted Micro Enterprises in taking their business to the...
Announcement, Conceptual, Customer Stories
This guest blog post was written by Dean Record, Engineer at Goji Investments. Goji Investments launched in 2016. Our platform democratises access to real estate, business lending, renewables, and other alternative investments....

Start your FREE TRIAL today!

Instana, an IBM company, provides an Enterprise Observability Platform with automated application monitoring capabilities to businesses operating complex, modern, cloud-native applications no matter where they reside – on-premises or in public and private clouds, including mobile devices or IBM Z.

Control hybrid modern applications with Instana’s AI-powered discovery of deep contextual dependencies inside hybrid applications. Instana also gives visibility into development pipelines to help enable closed-loop DevOps automation.

This provides actionable feedback needed for clients as they to optimize application performance, enable innovation and mitigate risk, helping Dev+Ops add value and efficiency to software delivery pipelines while meeting their service and business level objectives.

For further information, please visit