New Features

  • Added support for Code Tracing.

    • Implemented the zendhq_codetracing ZendHQ daemon module that implements Code Tracing support in the daemon.
    • Implemented Code Tracing support in the PHP ZendHQ extension.
    • Added the cttool command line tool that can be used to inspect and convert binary Code Tracing dump files.
  • Monitoring rules now support the "codetrace" action, which triggers the Code Tracing trace collection.

    Monitoring rule actions can now be clued to a specific condition. These actions are executed only if the specific condition is met.

  • Added PHP 8.2 support.

Changes

  • Added support for querying Monitoring issues and events by the request ID value.

    • The mon.get_issues JSON-RPC method now accepts the request_id optional parameter that can be used to filter all the Monitoring issues with events from the specified request.

    • The mon.get_events JSON-RPC method now accepts the request_id parameter that can be used to filter all the Monitoring events from the specified request. This can be combined with the issue_id parameter, which will filter all the Monitoring events with the specified issue ID value AND request ID values.

  • Added optional execution time and memory usage to monitoring events and issues.

    • JSON-RPC methods mon.get_issue and mon.get_event now report the actual execution time in milliseconds in the exec_time_msec member for monitoring event types function-slow-exec and request-slow-exec.
    • JSON-RPC methods mon.get_issue and mon.get_event now report the actual memory usage in bytes in the memory_usage_bytes member for the monitoring event type request-high-mem-usage.
  • mon.issue JSON-RPC notification events are now sent out also when Code Tracing status changes.

  • Rewrote RSA decryption for ZendHQ license file so that it works also with OpenSSL3 on Ubuntu 22.04.

Fixes

  • Fixed a memory leak and exit crash in PHP caused by internal functions that are not cached.

    The PDO PHP extension creates and destroys some methods at runtime. This caused a conflict in the ZendHQ extension that assumed that all the PHP internal functions and methods are persistent.

    Now all the PHP internal functions and methods marked with the ZEND_ACC_NEVER_CACHE are stored together with PHP user functions and released at the end of the request.

  • Fixed a PHP crash caused by some internal PHP functions.

    PHP internal functions marked with ZEND_ACC_CALL_VIA_TRAMPOLINE are now ignored. Their zend_function pointer becomes NULL in the function handler and we are not able to process function return nor leave events.

  • Fixed ZendHQ PHP extension request processing in case of a PHP fatal error.

    If PHP encounters a unrecoverable fatal error during the request, it bails out meaning that none of the function calls in the call stack return. The ZendHQ PHP extension now recovers from this situation and ensures that all the information collected so far is still properly stored.