Volume 11 · Chapter 2 — Banking Production Support and Troubleshooting

Diagnosing with Observability

Goutham Mayaluri 8 min read AWSCloudObservabilityBankingTroubleshootingProduction

2.1 Introduction

Once service is stabilized, diagnosis is about turning the observability data - metrics, logs, and traces - into a root cause efficiently. Volume 6 covered instrumenting systems; this chapter is about using that instrumentation under pressure to find the problem fast. Knowing the diagnostic workflow - how to move from a symptom to a cause using the three pillars together - is a practical skill that shows up directly in incident handling and in interview scenarios where you’re asked “how would you debug this?“

2.2 The Diagnostic Workflow

Effective diagnosis follows a workflow that uses the three pillars in sequence. Start with metrics to detect and scope: which metric is abnormal (error rate, latency, saturation), when did it start, and how widespread is it - this tells you what’s wrong and where to look. Then use traces to localize: for a distributed request, the trace and service map show which service or downstream call is the source of the errors or latency, narrowing the search from “somewhere in the system” to a specific component. Then use logs to explain: query the logs for the affected requests (by correlation ID) to see exactly what happened - the specific error, the reason. Metrics detect and scope, traces localize, logs explain - moving methodically from symptom to component to cause rather than randomly guessing.

flowchart LR
  M[Metrics: which signal is abnormal,\nwhen, how widespread?] --> T[Traces: which service/call\nis the source?]
  T --> L[Logs: what exactly happened?\n(query by correlation ID)]
  L --> Cause[Root cause identified]
  Note[Detect & scope -> localize -> explain] -.-> M

2.3 Correlate with Changes and Dependencies

Alongside the pillars, correlate the problem with two things: recent changes (as in the last chapter - a deployment or config change coinciding with the onset is a prime suspect) and dependency health (is a downstream service, database, or external dependency the actual source?). Often a service shows errors not because it’s broken but because a dependency it calls is failing - the trace and the dependency’s own metrics reveal this. So diagnosis isn’t only about the failing service in isolation; it’s about whether the cause is a recent change, the service itself, or something it depends on. Checking the timeline of changes and the health of dependencies alongside the service’s own telemetry is what pins down the true source rather than a symptom.

2.4 Reading the Golden Signals

The golden signals - request rate, error rate, latency, and saturation - guide diagnosis. A spike in error rate points to failures (find which errors in the logs, which service in the traces). High latency points to slowness (traces show where the time goes - a slow database query, a slow dependency). Saturation (resources maxed - CPU, memory, connections, queue depth) points to a capacity or resource-exhaustion problem. A drop in request rate can indicate an upstream problem (traffic not arriving). Reading these signals together frames the problem: errors versus slowness versus saturation are different failure modes with different causes and fixes, and identifying which you’re facing directs the investigation efficiently rather than chasing the wrong thing.

2.5 Forming and Testing Hypotheses

Good diagnosis is hypothesis-driven: from the evidence, you form a specific hypothesis about the cause (“the new deployment introduced a bug causing these errors,” “the database is saturated by a slow query,” “a downstream dependency is timing out”) and then check the evidence that would confirm or refute it, rather than randomly trying fixes. If the hypothesis is confirmed, you’ve found the cause; if refuted, you form the next one from the new evidence. This scientific approach - hypothesize from evidence, test, iterate - is far faster and safer than trial-and-error changes, which waste time and risk making things worse. It also keeps the investigation honest: you follow the evidence to the actual cause rather than fixating on a guess.

2.6 Banking Production Scenario

When a bank’s payment latency alerts, the on-call engineer runs the diagnostic workflow. Metrics show p99 latency on the payment service climbing sharply, starting 10 minutes ago - detecting and scoping the problem. The trace and service map localize it: the payment service’s calls to the database are the slow segment. Logs for the affected requests (by correlation ID) explain it: a particular query is timing out. Correlating with changes reveals a deployment 12 minutes ago that altered that query, and the database’s own metrics confirm it’s now saturated by the inefficient query. Hypothesis confirmed. The engineer mitigates by rolling back the deploy, restoring latency, then fixes the query properly. Metrics detected and scoped, traces localized, logs explained, and change-correlation pinned the cause - a fast, methodical diagnosis instead of guesswork.

2.7 Troubleshooting: Slow or Failed Diagnosis

Diagnosis stalls for identifiable reasons. Not knowing where to start means not using metrics to scope first - begin with which signal is abnormal, when, and how widespread. Knowing something’s wrong but not where means not using traces to localize across services - follow the trace to the responsible component. Not understanding the cause means not querying the logs for the affected requests - use correlation IDs to see what happened. Missing a change-induced cause means not correlating with recent deployments - check the timeline. Blaming the failing service when a dependency is the real source means not checking dependency health - look downstream. Randomly trying fixes means not being hypothesis-driven - form a specific hypothesis and test it. The discipline is metrics-to-scope, traces-to-localize, logs-to-explain, correlate with changes and dependencies, and hypothesize-and-test - which turns diagnosis into a fast, methodical process.

Interview Question

A service's error rate suddenly spikes in production. How do you diagnose it?

I diagnose it with a methodical workflow that uses the three observability pillars in sequence, correlates with changes and dependencies, and is hypothesis-driven - after first ensuring service is being restored if customers are impacted. I start with metrics to detect and scope: I confirm which signal is abnormal - here the error rate - see exactly when it started, and determine how widespread it is and which service is affected, so I know what I’m dealing with and where to look. Very early I ask what changed, because most incidents follow a change, so I check whether a deployment, config change, or infrastructure modification coincides with the spike’s onset - if a deploy went out just before, it’s a prime suspect and rolling it back may be the fastest mitigation. Then I use traces to localize: for the failing requests, the distributed trace and service map show which service or which downstream call is actually producing the errors, narrowing it from “the system is erroring” to a specific component - and importantly this reveals whether the service is broken itself or whether a dependency it calls is the real source, which is common. Then I use logs to explain: I query the logs for the affected requests by their correlation ID to see exactly what happened - the specific error and its reason - which turns “errors are up” into “this call is failing because of this”. Throughout, I correlate with two things: recent changes (the timeline of deployments and config changes) and dependency health (is a downstream service, database, or external dependency failing and causing my service’s errors?), because the true cause is often a change or a dependency rather than the failing service in isolation. I read the golden signals to frame the failure mode - a pure error spike versus latency versus saturation are different problems - and I stay hypothesis-driven: from the evidence I form a specific hypothesis, like “the new deployment introduced a bug causing these errors” or “a downstream dependency is timing out,” and I check the evidence that would confirm or refute it rather than randomly trying fixes; if confirmed I’ve found the cause, if refuted I form the next hypothesis from the new evidence. This scientific approach is faster and safer than trial-and-error. So concretely for an error spike: metrics to scope it and see when it began, check what changed, traces to localize which service or downstream call is failing, logs by correlation ID to see the actual error, correlate with recent deployments and dependency health, and form and test a hypothesis - mitigating first (often a rollback) if customers are down, then fixing the confirmed root cause. That methodical metrics-traces-logs-plus-change-and-dependency workflow is how I turn a symptom into a root cause quickly instead of guessing.

Chapter Revision Notes

  • Diagnostic workflow: metrics to detect and scope → traces to localize the responsible service/call → logs (by correlation ID) to explain what happened.
  • Correlate with recent changes (deployments/config) and dependency health - the cause is often a change or a failing dependency, not the service itself.
  • Read the golden signals: errors vs latency vs saturation vs dropped request rate are different failure modes with different causes.
  • Be hypothesis-driven: form a specific hypothesis from evidence and test it, rather than trial-and-error changes.
  • Metrics detect and scope, traces localize, logs explain - a fast methodical path from symptom to cause.