Profiling Go apps with Blackfire
Blackfire now supports profiling Go applications. Discover how this can change the game vs the built-in Go profiler.
Blackfire now supports profiling Go applications.
We’re really excited about supporting the Go language, as Blackfire is an extensive Go user. We’re looking forward to the feedback we’ll get from Go users. The various use cases will definitely help us build an even better product.
Behind the scenes, Blackfire uses the built-in Go profiler data. So you could ask: why build another profiler than the built-in one? What is the added value of Blackfire?
Blackfire, the next-generation profiler for Go
One of the first reasons is that we wanted to offer an appealing, interactive user interface, which would make it nicer to browse through large amounts of data.
Blackfire for Go also brings lots of the other ingredients which made its success on PHP:
- it makes it easy to instrument code;
- it offers a built-in security model which enables only designated users to profile a production application;
- Blackfire is inert (generating zero overhead) as long as it is not triggered;
- as a consequence, there is no need to remove the Blackfire instrumentation before deploying an application production;
- it is possible to compare Go profiles to check the impact of code changes;
- as Blackfire also supports other languages (like PHP and Python), if your stack includes some of them, you will be able to use the same tool for profiling them all.
Sounds great, right? Well, there’s more.
Distributed profiling across languages
Blackfire supports profiling micro-services architectures with its “Distributed Profiling” feature.
In the modern world, it is not un-common to have some Go code call an application written in another language like Python or PHP. In that case, Blackfire can seamlessly profile all your applications and link all profiles, granting an extra level of transparency in how which part of the code contributed to resources consumption, no matter which language it’s written with.
Open Source Code
Want to have a deeper look into how the Blackfire works? The Blackfire probe for Go is Open Source!
Happy Go profiling,