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:
The v2
version is the one you want to use. If you have
automation based on the previous version, select v1
, which is still
supported until the Aug, 31th 2021.
If you are upgrading from v1, please read the upgrade guide.
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 dd of=/usr/share/keyrings/blackfire-archive-keyring.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/blackfire-archive-keyring.asc] http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list
sudo apt update
blackfire
package:sudo apt install blackfire
This command asks for some Blackfire server credentials, log in or sign up now to get them:
or Sign Up
Learn more about the agent configuration file.sudo systemctl restart blackfire-agent
During the agent installation, a new
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.
import github.com/blackfireio/go-blackfire
Check that there are no errors in the logs. To debug problems, change the log level and the log file in the Probe configuration.
You can now enable monitoring for your environments.
To profile applications, use the Go SDK.
For on-demand profiling, you need to install a profiling client:
Profile from the command line via the blackfire
tool
(Web applications, APIs, command line tools, daemons, and more).
Configure it with your personal credentials:
blackfire client:config --client-id=CLIENT_ID --client-token=CLIENT_TOKEN
Start profiling via: