Observability Monitoring And Incident Response

Alert Response, Runbooks, And On-Call Handoff

On-Call Done Humanely

On-call means a designated person is responsible for responding to production alerts during a shift. The point is a clear, single owner for "who responds right now," so an alert never lands in a diffuse group where everyone assumes someone else has it. A workable on-call setup has a few properties:

  • A rotation, so the burden is shared and no one is permanently tethered. Rotations are usually weekly, with a secondary/escalation person who is paged if the primary does not acknowledge within a few minutes.
  • A humane alert load. This is where the alerting discipline becomes a human-welfare issue: an on-call shift drowning in false pages causes burnout and, worse, trains responders to ignore alerts — the fatigue that misses the real one. The alert-quality bar (actionable, urgent, real) is not just tidiness; it is what makes on-call sustainable.
  • Compensation and reasonable limits, because being on call is real work and real disruption.

Runbooks: The Knowledge That Survives 3 A.M.

A runbook is a written, step-by-step procedure for handling a specific alert or operational task. Its entire purpose is to move knowledge out of one senior engineer's head and into a document a tired, possibly less-experienced responder can follow under pressure. Every paging alert should link to its runbook — and conversely, if you cannot write a runbook for an alert (there is nothing specific to do), that alert probably should not page.

A good runbook is concrete and skimmable, not an essay:

PHP example
<?php

declare(strict_types=1);

$runbook = [
    'alert'     => 'Queue depth rising for 30m',
    'means'     => 'Jobs are arriving faster than workers process them',
    'check'     => 'worker process count, recent deploy, slow-job logs, downstream API health',
    'mitigate'  => 'scale workers; if a poison job, move it to the dead-letter queue',
    'escalate'  => 'if depth still climbing after 15m, page the platform team',
];

foreach ($runbook as $section => $content) {
    echo strtoupper($section) . ': ' . $content . PHP_EOL;
}

// Prints:
// ALERT: Queue depth rising for 30m
// MEANS: Jobs are arriving faster than workers process them
// CHECK: worker process count, recent deploy, slow-job logs, downstream API health
// MITIGATE: scale workers; if a poison job, move it to the dead-letter queue
// ESCALATE: if depth still climbing after 15m, page the platform team

The sections that matter: what the alert means, what to check first (the likely causes in priority order), how to mitigate (stop the bleeding — often not the same as the full fix), and when and to whom to escalate. Runbooks are living documents: every incident either confirms a runbook or exposes its gap, and updating it is part of closing the incident.

Responding To An Incident

When an alert fires, the response has a shape worth internalizing, and it deliberately puts mitigation before diagnosis:

  • Acknowledge — signal you have it, so escalation does not fire and others know it is owned.
  • Assess — how bad, who is affected, is it getting worse. Severity drives everything after.
  • Mitigate — stop user pain first, even with a temporary measure: roll back the suspect deploy, scale the resource, disable the feature flag, fail over. Restoring service is the priority; understanding the root cause can wait until users are no longer hurting. This ordering is the single most important habit in incident response, and the instinct to debug first is the most common mistake.
  • Communicate — for anything user-visible, keep stakeholders and a status page updated. Silence during an outage erodes trust faster than the outage itself.
  • Resolve and hand off or close.

For larger incidents, name an incident commander — one person who coordinates rather than fixes, so the responders can focus. Their job is the process (who is doing what, communications, escalation), not the keyboard.

Handoff And Learning

When a shift ends or an incident passes between people, a clean handoff carries the context: what is ongoing, what was tried, what to watch. An incident dropped mid-investigation with no handoff restarts from zero and often repeats work or reintroduces the problem — the same context-loss failure the collaboration track guards against in reviews, here under time pressure.

After a significant incident, a blameless postmortem turns one expensive event into cheaper future ones. Blameless is the operative word: the goal is to fix the system — the missing alert, the misleading runbook, the fragile dependency, the deploy that had no watch window — not to assign fault to a person, because fear of blame is what makes people hide the information a real fix needs. The output is concrete action items with owners, and the most valuable ones usually feed straight back into the earlier lessons of this track: a new alert, a tuned threshold, a written runbook, a rollback made faster.

What To Check

Before moving on, make sure you can:

  • explain what on-call provides and why alert quality is a human-welfare issue
  • describe a runbook's purpose and its check/mitigate/escalate structure
  • order incident response as acknowledge, assess, mitigate-first, communicate, resolve
  • explain the incident commander role in larger incidents
  • run a clean handoff and a blameless postmortem that fixes the system

What You Should Be Able To Do

After this lesson, you should be able to set up a sustainable on-call rotation, write runbooks a tired responder can follow, run an incident with mitigation before diagnosis, hand off cleanly, and turn postmortems into concrete improvements that make the whole monitoring system better.

Practice

Practice: Design On-Call And A Runbook

For a six-engineer team running a PHP SaaS, design the on-call setup and write one complete runbook for a chosen paging alert. Specify the rotation, escalation, alert-load safeguards, and the runbook's structure.

Show solution

Runbook for "API 5xx > 2% for 5m":

  • Means: a meaningful fraction of API requests are failing — user-facing.
  • Assess: check the error-rate graph (how high, still climbing?) and the error tracker filtered to the current release for the dominant exception.
  • Check, in priority order: (1) recent deploy in the last hour — most incidents are change-triggered; (2) dependency health (database, cache, downstream APIs) on the dashboard; (3) saturation (php-fpm workers, DB connections).
  • Mitigate first: if a recent deploy correlates, roll it back immediately (one command) before diagnosing — restore service, then investigate. If a dependency is down, fail over or shed load.
  • Communicate: update the status page if customer-visible.
  • Escalate: if error rate is not falling 15 minutes after mitigation, page the secondary and, for a major outage, name an incident commander.

The runbook is linked directly from the alert, lives in the team's ops docs, and is updated after any incident that reveals a gap in it.

Practice: Diagnose A Chaotic Incident

Task

Diagnose each failure and the practice that prevents it.

Show solution
  • Diffuse ownership (20 minutes lost): the alert went to a group with no single owner, so everyone assumed someone else had it — the exact failure on-call exists to prevent. Fix: a rotation with one named primary who must acknowledge, and auto-escalation to a secondary if they do not. "Everyone is responsible" means no one is.
  • Diagnosis before mitigation (an hour of user pain): the responder debugged root cause while the fix — rolling back the obviously-correlated deploy — sat available the whole time. Mitigation comes first: restore service, then investigate. Since the incident followed a deploy, the runbook's first check should have been "recent deploy? roll it back," making the two-minute fix the first action, not the last. This inversion is the most common and most costly incident mistake.
  • No communication: no status page, so support was blindsided and customer trust took the full hit of silence. Fix: for user-visible incidents, a status-page update is part of the response, ideally an incident-commander responsibility so responders can focus on the fix.
  • Blameful postmortem: blaming the deployer produced the worst possible outcome — an engineer now afraid to deploy, which pushes the team toward rarer, bigger, riskier releases. Fix: blameless postmortems that fix the system. The real findings here are systemic: no clear on-call owner, a runbook that did not put "roll back the deploy" first, no watch window that would have caught it at deploy time, and no status-page process. Each becomes an action item with an owner. Fear of blame is what makes people hide the information a real fix needs.

The corrected shape: named on-call acknowledges → assess → mitigate-first (roll back) → communicate → resolve → blameless postmortem feeding fixes back into alerts, runbooks, and deploy safety.

Practice: Define Incident-Readiness Checks

Define the checks that confirm a team's incident-response system (on-call, runbooks, response process, learning loop) actually works.

Show solution
  • Every paging alert is verified to have a linked runbook; an alert without one is flagged, since it either needs a runbook or should not page.
  • On-call acknowledgement times and escalation firings are tracked; frequent escalations (primary not acknowledging) or slow acks indicate a rota or alert-load problem.
  • Alert volume per shift is measured, and a rising trend is treated as a defect against sustainability — the human-welfare version of alert-fatigue monitoring.

Human, periodically:

  • Run a game-day / incident drill: fire a test scenario and confirm a named responder acknowledges, follows the runbook, mitigates before diagnosing, and communicates. Gaps found in a drill are cheap.
  • Review recent postmortems: are they blameless, do they have owned action items, and did those items actually ship? A postmortem whose actions never get done is theater, and the same incident recurs.
  • Confirm runbooks are current — each recent incident should have either validated or updated the relevant runbook — and that handoffs between shifts carry ongoing context rather than dropping it.

The single most revealing check is the drill: teams consistently discover their runbooks, on-call clarity, or mitigation instincts do not survive contact with a real page until they practice one.