Pyroscope uses py-spy to collect profiling data.

Supported platforms

Spy NameTypeLinuxmacOSWindowsDocker

Profiling Python application

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

export PYROSCOPE_SERVER_ADDRESS=http://pyroscope-server:4040
pyroscope exec python runserver

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.