Zend Code Tracing

Zend Code Tracing enables real-time execution flow recording in Production Environments.

Code Tracing enables deep analysis of PHP execution and flow using drill-down requests related to an Event (Monitoring Rule), or triggered manually.

The component focuses on collecting key data points such as:

The information collection process focuses on keeping relevant information based on either user-defined parameters that trigger events or a specific URL that is manually entered to be traced. For monitor events, each time an event is triggered the information is kept for further use. Otherwise, the information will be discarded to preserve disk-space. Events can also be triggered to generate a trace file for a specific URL (see Triggering a URL Trace).


Trace information is a capture of the Function Tree and enables deep tracing of the functions of the server parameters, including:

Workflow - The trace displayed in the Zend Server web console functions like a DVD player, showing the recorded execution history of the application. Users can follow the footsteps of a single problematic request in order to quickly pinpoint the root cause of the problem.

  1. Manual Workflow - The code tracing of a single request can be generated manually through the code tracing page in Zend Server (Monitor | Code Tracing) (Figure 1). By executing a request, the full application execution is captured and stored in a trace file. The captured trace data can undergo collaborative reviewed leaving no need for developers and test engineers to pore over the symptoms of the defect and no room for misinterpretation of the events leading up to the error.
  2. Event Monitoring Workflow - Code tracing in Zend Server has very low performance overhead. This therefore enables its use either while running a load test in the lab or while running in production.

By leveraging the Zend Server event monitoring mechanism, code tracing can save trace data only when a problem occurs. For example, when the performance of a checkout process in a web application drops below a predefined threshold, Zend Server can send an alert and capture the entire execution of the poorly performing request. The combination of knowing that a problem has occurred, while recording the entire execution flow, allows for quick identification and correction even before other users may notice.


One of the most appealing characteristics of this application is that the performance and memory characteristics have been designed to be suitable for production environments and excellent in-depth trace of execution.

Other advantages:



Related Links

Related Links:

Code Tracing Tree

Code Tracing Statistics
Code Tracing  

Working with Code Tracing

Zend Code Tracing - Configuration Directives