The hitchhiker’s guide to observability – part 1

Your application’s performance is only as strong as your observability habits. Learn how Blackfire can help you spot issues before they escalate, and find out how easy it is to start integrating observability into your workflow with simple, actionable 5-minutes steps.

By Thomas di Luccio, on Sep 25, 2024

The year is 2042, and the planet is about to be demolished by some alien constructor. Or is it 2029, and a cyborg is sent back in time to perform an assassination? Or is some AI takeover about to happen?

A cataclysmic event plays a pivotal role in the life of the main character forced to become an involuntary hero to save their life and the world. While many of us might love those stories, not many wish to experience such an ordeal.

Having your application crash at the worst possible moment might seem like the least story-worthy event. Yet, while less epic, it’s the most likely for us developers. Raise your hand if you have already been in such a situation. 🙌 You are not alone; that club is growing by the minute.

Observability: the disaster remedy

Observability might be your most vital asset in your quest to prevent your application from crashing and bringing you on a harrowing journey with it. Blackfire helps you monitor your apps in real-time, spotting problems and potential issues before they happen.

This quick problem-solving solution and the long-term performance improvements it allows mean you can manage your apps better, even during tough times. Blackfire allows you to build and improve your apps with confidence.

There is one caveat, though. Observability is helpful only if you use it. The more embedded it gets into your development and deployment workflow, the more powerful it becomes.

Small steps for a giant leap

Therefore, your journey toward improved and secured application performance starts by building a habit. That gym membership card sitting in the back of a drawer or those rarely opened healthy cookbooks are hints that this is easier said than done. What if you could hack your way?

Let’s explore what 5-minute observability-related tasks you could consider to get started. These tasks could easily be squeezed into any schedule and ultimately significantly impact your journey.

This is a dev application of compound interest logic, in which investment gains keep accumulating, and money grows faster over time. In other words, cumulating small steps might be more beneficial than one single giant leap.

1/ Ensure Blackfire is installed on all environments

Make a gift to the future-you by enabling Blackfire on all environments: local, dev, staging, production. You may still need to find out what the future will bring. But you will be grateful if past-you has paved the way for a faster recovery.

We provide guides on installing and configuring Blackfire in most environments. We also document setting up Blackfire on Docker, DDEV, and many PaaS, such as Upsun, Platform.sh, and Adobe Commerce Cloud.

Every install should take you about 5 minutes to complete and could constitute your first baby steps toward performance optimization. Trigger your first profile to validate the configuration.

2/ Activate Blackfire Monitoring and Continuous Profiling

Blackfire Monitoring and Continuous Profiling are ways to monitor your applications in real-time and continuously collect information. This blog post series might help you understand the differences and complementarities between the two.

In other words, those two observability techniques can be your allies by constantly being in action while you go about your day. While we need data and the ability to turn it into information, you don’t have to be always on duty to collect it. Let’s automate this, and carry on with our lives.

Once Blackfire is installed, Blackfire Monitoring (PHP, Python) is enabled by default. Blackfire Continuous Profiler (PHP, Python, Node.js, Go, Ruby, Rust) requires a specific configuration. Those configurations also require around 5 to 10 minutes each.

3/ Prioritize the most impactful transactions

Checking the monitoring data for the first time can be overwhelming and dizzying. There is a lot of information to consider. You might want to take a couple of minutes to read that blog post showing you the ropes of the monitoring dashboard.Then, why don’t you consider the “Top Transactions” section of the dashboard? From a Monitoring perspective, a transaction is a group of server-side requests traced by Blackfire, and for which a name has been defined.

The transactions are sorted by impact, which represents the percentage of time spent processing one transaction compared to all the others. A good practice is always to prioritize optimizing and enforcing the parts of your application affecting your end-users the most. This is one key to a smooth user experience. Take a couple of more minutes to identify the transactions to prioritize.

In the next and last installement, we will continue our hitchhiking journey in observabililty.  By cumulating simple and actionable 5-minutes tasks, we will try to build an healthy habit and answer the great question of life, the universe and everything observability.

To better observability and beyond


The “Hitchhiker’s guide to observability” series:

  • part 1 (you are here)
  • part 2 and final: soon

Thomas di Luccio

Thomas is a Developer Relations Engineer at Platform.sh for Blackfire.io. He likes nothing more than understanding the users' needs and helping them find practical and empowering solutions. He’ll support you as a day-to-day user.