When to use this article
This article is meant to support Magento Cloud customers (merchants and solution integrators) to fix the most common issues in using Blackfire that could be related to erroneous configurations.
It can be achieved by a person who:
- has the necessary privileges on the Magento Cloud project
- has the necessary privileges on Blackfire (requires steps 1 and 2 of the configuration guide to be completed)
- is comfortable with using the Magento Cloud CLI (v1.23 and more recent)
The following steps will ensure that all existing configuration of Blackfire on Magento Cloud is removed, then configured again.
Removing all Blackfire configuration
The following steps must be completed for each existing branch:
staging(for Pro customers only)
git checkout [branch name]
magento-cloud variable:delete env:BLACKFIRE_SERVER_ID
magento-cloud variable:delete env:BLACKFIRE_SERVER_TOKEN
magento-cloud integration:list (find all IDs of integrations which have a URL including "@blackfire.io")
magento-cloud integration:delete [ID]
Configuring Blackfire for all branches
The following command will automatically setup Blackfire for all branches, adding the environment variables and the integrations. No need to run it again on other branches.
Please note this command will trigger a redeploy of all of your environments, including production. Please plan execution accordingly.
Checking if it works
Once this is completed, please:
- try to profile on production, staging and integration
- for Pro customers, try to redeploy the integration branch. It should start a Blackfire build, which you should see on the Blackfire site
- for Starter customers, try to setup the Periodic builds in Blackfire, and click on the "Test" button before clicking on "Save"
If it doesn't work
Please collect and send us the logs, as per this article.