PHP Extension 5.10.0 released

  • Improvement: Stacktraces attached to Spans now start at so-called “vendor boundaries” instead of the function that is actually instrumented to prevent deeply-nested library wrappers from pushing the application stackframes over the tideways.backtrace_limit. An example would be curl_exec() being called inside of Guzzle’s middleware stack. Now the stacktrace will be cut at outermost call to Guzzle’s request() method. The default value of tideways.stack_threshold has been reduced to 3000ms to generate more stack traces and the default value tideways.backtrace_limit has been reduced to 5 to counter-balance the increase in payload size.
  • Improvement: The timer used for measurements now uses PHP’s hrtime() timer for PHP 7.3+. Going forward the INI setting tideways.clock_source is only used for PHP 7.2.
  • Improvement: Callgraph argument capture for regular expressions with the /x modifier now strips whitespace to show more useful parts of the regular expression.
  • Improvement: Span events now include memory usage data.
  • Bugfix: Fix possible crash in Callgraph when first-class callables are used.
  • Bugfix: Registering a dynamic callback using Profiler::watch() or Profiler::watchCallback() for functions that are already instrumented is no longer allowed.
  • Bugfix: Fix MongoDB instrumentation memory leak if Tideways is started multiple times during a single request, for example in long-running worker scripts.
  • Bugfix: Parameter types of the \Tideways\Profiler and \Tideways\Profiler\Span methods are now unconditionally validated, resulting in consistent error reporting behavior independent of whether Tideways is running in tracing mode or not.
  • Bugfix: Manually handling Tideways’ lifecycle with Profiler::start() and Profiler::stop(), for example with FrankenPHP’s worker mode or long-running queue workers, will now send the PHPInfo payload during Profiler::stop(), resulting in more accurate data.
  • Bugfix: Self-recursive Closures are now correctly handled in the Callgraph, if tideways.features.closure_naming is active.

About the author

Tim Düsterhus

I’m a Software Engineer at Tideways, where I work on the PHP extension. My focus is on helping developers gain accurate insights into the runtime behavior of their applications with minimal overhead.

I’m interested in PHP internals and regularly contribute performance improvements to the PHP engine. I enjoy working on problems where small changes can have a measurable impact on the performance and efficiency of PHP applications. Several of my performance optimizations have become part of PHP itself, helping improve the language for developers worldwide.