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's
composer require ext-blackfire
Configure the Blackfire credentials from your project root directory:
To auto-fill server credentials in the command below, log in first
heroku config:set BLACKFIRE_SERVER_ID=SERVER-ID heroku config:set BLACKFIRE_SERVER_TOKEN=SERVER-TOKEN
If your app spans across 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).