Python

Pyroscope uses py-spy to collect profiling data.

Supported platforms

Spy NameTypeLinuxmacOSWindowsDocker
pyspyembedded

Profiling Python application

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

export PYROSCOPE_APPLICATION_NAME=my.python.app
export PYROSCOPE_SERVER_ADDRESS=http://pyroscope-server:4040
pyroscope exec python manage.py 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.