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.

Pre-requisites

  • Have the magento-cloud CLI 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_APPLICATION environment variable exists in your project (can be done with the magento-cloud variable:list  command). 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

  1. Open your terminal and locate your Magento Cloud project
  2. Execute the following command: magento-cloud blackfire:setup 

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

  1. 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.
  2. Follow the installation procedure depending on your machine and OS, and use the environment's server credentials.
Did this answer your question?