Heroku

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.json file:

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
To get you server credentials, log in or sign up now:

or

Profile using the regular Blackfire CLI tools or the Chrome Companion!

Note

If your app spans across several dynos you might have to turn on Session Affinity using the heroku features:enable http-session-affinity command so that only one dyno is profiled when aggregation is enabled (the default).