KatInterview

Tracking Down Intermittent Production Errors Using Only Logs

BehavioralModel answer
MediumModel answerBehavioraldebuggingobservabilityincident-response

Last updated

Plan a log-driven investigation of sporadic production failures that never show up in local tests, including team task split, hypothesis tracking, fix verification and a postmortem.

You have just taken ownership of a backend service. Its unit tests all pass on your laptop, yet production logs show errors that appear sporadically and without an obvious pattern. No debugger can be attached to the live system, so logs are your main source of evidence.

Describe how you would handle this from first alert to final retrospective. Your answer should cover:

  1. Log configuration: how you would adjust verbosity in production, safely and temporarily.
  2. Better log content: what structured, contextual fields you would add, and how correlation IDs let you follow a single request.
  3. Finding the signal: how you would cut through a noisy log stream to find the errors that matter.
  4. Reproduction: how you would build a minimal, repeatable failing case.
  5. Isolation: how feature flags or canary releases help you narrow down the culprit.
  6. Team organization: how you would split the investigation among teammates, set up a triage board, and track each hypothesis until it is resolved.
  7. Closing out: how you would prove the root cause, ship the fix, add regression tests and alerts, and hold a blameless postmortem.

Explain the reasoning behind your choices and the trade-offs involved, not just a checklist.

Hints

Hint 1

Start by measuring impact and finding when the errors began. Compare that timeline with deploys, config changes and traffic patterns, and decide whether a rollback should come before any investigation.

Hint 2

Think about what differs between your laptop and production: concurrency, real data shapes, timeouts, resource limits, configuration and dependency versions. Turn each difference into a hypothesis that makes a testable prediction.

Hint 3

Treat the investigation like a project: give one owner per track, keep a single board listing each hypothesis with its evidence for and against, and only call a cause confirmed when you can both trigger and remove the failure on demand.