The Confident Learner
Part A — The Tech FundamentalsChapter 11

Observability and Debugging in Production — Logs, Metrics, Traces, and the Difference Between Guessing and Knowing

The bug that two engineers had already failed to fix

Lavanya had been at the bus-ticket booking platform in Kochi for about ten months when the bug landed on her desk. It did not land gently. It arrived with a history. It had been open for two weeks, and two engineers before her had already tried and failed to fix it, which is a particular kind of pressure for someone ten months into their first job.

The bug was this. Roughly one in every few hundred bookings failed at the final step. The customer's money was taken. The seat was held. But the confirmation SMS and the ticket never arrived, and the booking sat in a "pending" state forever until a support person noticed it and fixed it by hand. It was not tied to any one bus operator. It was not tied to any one payment method. It was not tied to any one route or time of day that anyone could find. It was just there, quietly, a steady trickle of customers who had paid and received nothing.

Lavanya did exactly what college had taught her to do, and she did it well. She tried to reproduce it. She made a hundred test bookings on her own machine. Every single one succeeded. She read the booking code carefully, line by line. It looked correct. She added print statements at every step of the booking flow, deployed them, and watched the output. The output was thousands of successful bookings per hour scrolling past, and somewhere in that flood were the few that failed, and she had no way to pick them out. She was trying to find one specific straw by examining a haystack one straw at a time, while more hay poured in.

Free to read · No payment ever

Sign in to keep reading Chapter 11

The whole book is free. A Google sign-in is the only thing between you and the rest of this chapter.

We only use your Google sign-in login to protect the site from automated bots and content scraping. What sign-in involves.