Your Magento Cloud package enables your team to use Blackfire on their development machines, on the Magento Cloud integration platform, and on staging and production clusters.
We strongly advise you to configure Blackfire on all machines in order to get the best out of profiling and testing.
- Have the
magento-cloudCLI v1.21.0 or more recent installed, follow these instructions to install it;
- Be a Super User / admin for the entire project.
- Check if the
MAGENTO_CLOUD_APPLICATIONenvironment variable exists in your project (can be done with the
magento-cloud variable:listcommand). Else, please reach out to your Magento Cloud account manager. Your architecture should be something like this.
If you do not meet one of those requirements, please use reach out to your Magento Cloud account manager.
Enabling Blackfire on Production, Staging, Integration and Active branches
Blackfire is fully safe to use in production. It will not generate any overhead for your end users.
- Open your terminal and locate your Magento Cloud project
- Execute the following command:
This command will automatically configure Blackfire on all environments, and activate automated profiling each time some change is applied to an environment (code change, merge, deploy,...).
Configuring Blackfire on your local machine
- Go to your "Integration and Development" or "Dev" environment Blackfire environment and click the Settings tab. Scroll down to the bottom to find the Server ID and Server Token for the environment.
- Follow the installation procedure depending on your machine and OS, and use the environment's server credentials.