Installing and updating Blackfire should be a quick process. This document will guide you through the steps.
For a better experience, you should or Sign Up.
Tell us what you want to do:
To start using Blackfire, we are going to install the following:
Blackfire uses a custom Debian repository to distribute its packages; it is compatible with most Debian-based distributions like Ubuntu and Linux-Mint.
wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add -
echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list
sudo apt update
sudo apt install blackfire-agent
This command asks for some Blackfire server credentials, log in or sign up now to get them:
or Sign UpLearn more about the agent configuration file.
sudo /etc/init.d/blackfire-agent restart
During the agent installation, a new
/etc/init.d/blackfire-agent service was created to
start, stop, and restart it. Whenever you modify the agent
configuration, restart it.
/var/log/blackfire/agent.log. Change the log file or the log level in the agent configuration file.
sudo apt install python-pip
pip install blackfire --user
If you have multiple versions of Python installed on your system, it is possible that
you have multiple versions of the
pip binary installed as well.
For example, you can have
pip2 installed for Python >= 2.0, and
for Python >= 3.0.
In order to profile with
blackfire run without any code
modification on your application, you need to install the
blackfire_bootstrap.pth file as a site-specific
python -m blackfire install-bootstrap
If you want to remove the
you can run this command:
python -m blackfire uninstall-bootstrap
To profile applications, use the Python SDK.
For on-demand profiling, you need to install a profiling client:
Profile from a browser via our browser extensions (Web applications only).
Profile from the command line via the
(Web applications, APIs, command line tools, daemons, and more).
Configure it with your personal credentials:
blackfire config --client-id=CLIENT_ID --client-token=CLIENT_TOKEN
Start profiling via: