Pyroscope uses phpspy to collect profiling data.

Supported platforms#

Spy NameTypeLinuxmacOSWindowsDocker

Profiling PHP application#

To start profiling a PHP application, add pyroscope exec before the command:

export PYROSCOPE_APPLICATION_NAME=my.php.appexport PYROSCOPE_SERVER_ADDRESS=http://pyroscope-server:4040
pyroscope exec php main.php

You can also attach pyroscope to already running process using pyroscope connect:

pyroscope connect -pid {my-app-pid}

Refer to Configuration page to learn more about Pyroscop Agent and how to configure it.