Blackfire is part of the default Heroku PHP buildpack.
To enable Blackfire when using the PHP official Heroku buildpack, add it as a
requirement in the project
composer require ext-blackfire
Configure the Blackfire credentials from your project root directory:
heroku config:set BLACKFIRE_SERVER_ID SERVER-ID heroku config:set BLACKFIRE_SERVER_TOKEN SERVER-TOKEN
You can also provision the Blackfire addon via the
command, but the setup is more complex without any real benefits. Read more
If your app spans accross several dynos you might have to turn on Session Affinity
heroku features:enable http-session-affinity command so that only one
dyno is profiled when aggregation is enabled (the default).