Installing and updating Blackfire should be a quick process. This document will guide you through the steps.
To start using Blackfire, we are going to install the following:
This installs the APT package for the Blackfire Agent. It might prompt for your password to grant root privileges.
pip
:blackfire
package:
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 pip3
installed
for Python >= 3.0.
Ensure blackfire-python
command is in your $PATH
.
Blackfire pip
package installs the blackfire-python
command,
which can be used for zero configuration profiling.
The folder where blackfire-python
is installed may vary
depending on your Python environment (e.g. pyenv
,
virtualenv
).
Note that the folder blackfire-python
is installed in must be
in your $PATH
.
If you previously installed Blackfire bootstrap configuration hook
(blackfire_bootstrap.pth
, in versions <= 1.4.5
),
you must uninstall it by running the following command:
You can now enable monitoring for your environments.
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 blackfire
tool
(Web applications, APIs, command line tools, daemons, and more).
Start profiling via: