Zend Server User Guide > Concepts > Code Tracing

Code Tracing

Zend Server Code Tracing is an in-depth diagnostic tool that enables real-time execution flow recording in production environments that allows you to drill-down to the function level to view actual performance related information and statistics. Code Tracing enables deep analysis of PHP execution and flow using drill-down requests related to an event (Monitoring Rule), or triggered manually.

How do I work with Code Tracing?

The component focuses on collecting key data points, such as application functions and main PHP function calls, high-resolution timing and memory usage of execution elements and key PHP engine services such as Web server interface calls.

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.

Trace information is a capture of the function tree and enables deep tracing of the functions of the server parameters, including returns, memory and time (ms).

Tip!

To optimize performance in production environments, Zend Code Tracing for events can be activated for a set amount of time (120 seconds by default). For more information on configuring Code Tracing to maximize performance, see Configuring Code Tracing.

Workflows

The trace displayed in Zend Server for IBMi 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:

By leveraging the Zend Server for IBMi 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 for IBMi 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.

Root Cause Analysis

The trace displayed in Zend Server enables you to view the execution history of your application and follow in the footsteps of an individual, problematic request to quickly pinpoint the root cause. Furthermore, the Export option allows you to transfer this information into Zend Server allowing you to transfer the information to developers.

Code Tracing Tree

The Code Tracing Tree tab displays the call tree for a selected event or trace file.

Code Tracing Statistics

The Statistics per Function tab provides a statistical perspective of the data captured in the request.

 

Read Also

  Code Tracing    
  Working with Code Tracing