Define Custom Transaction Names in Blackfire Monitoring

By Jérôme Vieilledent, on Nov 30, 2021

Blackfire Monitoring natively supports a wide range of Open Source PHP and Python frameworks including Symfony, Laravel, Shopware, Magento, Django, or FastAPI.

For applications based on such frameworks, Blackfire groups server-side requests as “transactions”. It may correspond to a controller depending on the framework used or whatever is relevant to your application.

Transactions list

However, in some situations, Blackfire Monitoring may be unable to detect whether a request matches a supported transaction, thus listing it as an Unnamed transaction.

Transactions enable to have a clearer breakdown of where your application spends server ressources, and you might want to customize this list.

Blackfire lets you configure custom transaction names for unnamed transactions programmatically (which is the recommended way as it enables the automatic profiling feature). If you cannot afford a code change or redeploy, you can now alternatively set transaction names via the web user interface.

Working with glob patterns or regular expression, you can configure URL patterns then name transactions from the list of requests that Blackfire conveniently displays sorted per hit count.

Assigning URL patterns to transaction names

You are now in complete control of how your apps’ transactions are identified and listed in Blackfire Monitoring!

Happy performance optimization!

Jérôme Vieilledent

As a Developer Advocate, Jérôme is all about spreading the love! His technical/development background enable him to talk as a peer to peers with our developer users. You’ll read his tips and advices on performance management with Blackfire. And he’ll support you as a day-to-day user.