Skip to main content
Engineering/instrumentation-planExperimentalUpdated

Instrumentation Plan

Plan or audit system-health observability: SLIs, SLOs and error budgets, errors, logs, traces, delivery metrics and burn-rate alerting. Use when you cannot tell whether a service is healthy, outages are found by users, or alerts are noisy.

Use this when you need to know whether a product's systems are healthy and to hear about it before users do: uptime, latency, errors, scheduled jobs, deploy health, error budgets and the alerts that page someone. An engineer or tech lead walks away with SLIs and SLOs per critical journey, a telemetry wiring map (errors, logs, traces, metrics), a delivery-health baseline, a tiered alerting strategy and a prioritized checklist. It answers "is the system healthy?", not "are users succeeding?": product events and tracking plans are /observability-plan.

Related skills: Sits beside /observability-plan, which plans the product events. Feeds /sla-design with the SLOs an SLA is built on and /incident-response-plan with the alerts that start an incident. Follows /incident-postmortem when an incident exposed a detection gap. Use /llm-observability-plan for the AI-specific layer and /debug-assist when something is already broken.

You provide

  • {{system}}: what it does: services, APIs, background jobs, static pages, workers.
  • {{codebase}}: a repo path or URL, so existing hooks and monitors can be read rather than described.
  • {{current_monitoring}}: dashboards, alerts, error tracking, log destinations and uptime checks in place.
  • {{stack}}: hosting, CI/CD, CDN, databases, queues and third-party dependencies.
  • {{deploy_process}}: how code reaches production, how often, and how rollback works.
  • {{incidents}}: recent outages, degradations or close calls: what broke, how it was detected, how long recovery took.
  • {{team}}: who is on call, if anyone, and whether there is an SRE function.

Process

Step 1: Confirm the inputs and audit what exists

Ask for anything in You provide that is missing; work with what you have and flag gaps as assumptions. On a Next.js app on Vercel, inspect in this order and skip the rest:

  1. instrumentation.ts and instrumentation-client.ts at the app root: what register() starts and whether onRequestError reports server errors. On k8mak.com these start Sentry for errors only (tracesSampleRate: 0, sendDefaultPii: false), and only when NEXT_PUBLIC_SENTRY_DSN is set.
  2. Error boundaries: app/global-error.tsx and each route group's error.tsx.
  3. Scheduled jobs and probes: vercel.json crons and the health routes. On k8mak.com, read docs/site-monitoring.md first: it maps Sentry, the two-hourly /api/cron/api-probe/, the daily AI probe and the cron heartbeat rules tested in site/lib/__tests__/cron-health.test.ts.
  4. The live platform, read-only: Vercel runtime errors and logs for the last 7 days, and the project's drains.

Skip vendor feature tours and APM settings that no alert reads.

Step 2: Define SLIs, SLOs and error budgets

For each critical user journey or capability, pick SLIs from availability, latency, throughput, error rate, freshness and correctness, then set SLOs:

  • Set SLOs from user expectations, not aspirational perfection. Start conservative and tighten as confidence grows.
  • Give every SLO an explicit window; rolling 30 days is the common default.
  • Show the budget math: error budget = 1 - SLO. A 99.9% SLO over 30 days allows 0.001 x 30 x 24 x 60 = 43.2 minutes; over a year, 0.001 x 8,760 = 8.76 hours.
  • Define what happens when the budget is spent (for example, feature releases pause for reliability work). A budget with no consequence is not a budget.

Fill section 1 of reference/plan-template.md.

Step 3: Baseline delivery health with DORA

DORA now tracks five metrics: change lead time, deployment frequency, failed deployment recovery time, change fail rate and deployment rework rate. Failed deployment recovery time replaces MTTR. For each: current state (measured or estimated, and say which), a 90-day target, the data source (CI/CD logs, deploy history, incident tracker) and the biggest blocker. Compare against the team's own trend; These are team and process signals, never individual performance metrics. Fill section 2.

Step 4: Map the golden signals per component

Monitor the four golden signals for each service: latency (separate successful from failed requests), traffic, errors (explicit 5xx, implicit timeouts, wrong answers) and saturation (CPU, memory, disk, queue depth, connection pool). Add the browser as a component: real-user Core Web Vitals at the 75th percentile, mobile and desktop separately, against the "good" thresholds of LCP 2.5 s, INP 200 ms and CLS 0.1 (INP replaced FID in 2024). Fill section 3.

Step 5: Wire the telemetry

Decide, per signal, where it comes from and where it lands. Fill section 4.

Step 6: Design the alerting strategy

Use three tiers (P1 page, P2 warning, P3 info) and these rules:

  • Alert on symptoms users feel, not causes, unless a cause is the only early warning. Every page should be actionable and need intelligence; a robotic response is not a page.
  • Use burn-rate alerts for SLOs, not raw thresholds. Start from the SRE Workbook's multiwindow table for a 99.9% SLO: page at burn rate 14.4 over 1 hour (short window 5 minutes, 2% of budget), page at 6 over 6 hours (30 minutes, 5%), ticket at 1 over 3 days (6 hours, 10%).
  • At low traffic, one failure looks like a huge burn (one failed request in an hour of 10 is a 1,000x burn). Add synthetic probes, group services that share a failure domain, or lengthen the window (SRE Workbook).
  • Require 2 or more consecutive breaches before firing, to avoid flapping.
  • Every alert has a documented response action, an owner and a channel someone reads; no on-call means no phone alerts.
  • Review alert fatigue quarterly: an alert that fires more than 10 times a month without action is fixed or deleted.

Fill section 5.

Step 7: Compile, prioritize and review

Compile reference/plan-template.md with the checklist ordered P0 to P2. Include recommended tools only if the user asked or a clear gap exists. Then ask the user:

  • Are the SLOs realistic for the team's current maturity?
  • Is any critical component missing from the golden-signals table?
  • Does the alerting match the on-call setup?
  • Is the checklist ordered right for your priorities?
  • Would this plan have caught each incident from the last 6 months?

Adjust, then present the plan as formatted text in the conversation.

Output contract

  • Every critical journey has at least one SLI with an SLO, a window and an error budget, with the budget math shown.
  • The error budget has a stated consequence when spent.
  • All five DORA metrics have a current value or , a target and a data source.
  • Every component has latency, traffic, errors and saturation, or a reason one does not apply; the browser row uses p75 Core Web Vitals.
  • The wiring table names a source and destination for errors, logs, traces, metrics and scheduled-job heartbeats.
  • Every alert has a tier, an owner, a channel and a response action; SLO alerts use burn rates.
  • Every estimate is labelled as one.
  • Every checklist item has a priority.
  • Prose follows knowledge/voice-tone-guide.md, with no em-dashes.

Ruled out

  • Never set an SLO nobody will enforce. A 99.99% target with no budget process is meaningless.
  • Never instrument everything. Start with the critical journeys; over-instrumentation breeds alert fatigue and upkeep.
  • Never page on a cause when a symptom alert would do; cause alerts supplement, not replace.
  • Never ship an alert without a response action.
  • Never use DORA metrics to evaluate individual engineers.
  • Never present a guessed current state as measured; "assumed p95 about 500ms from anecdotal reports" is the honest form.
  • Never let a missed scheduled run read as healthy.

Not covered

  • Product events, tracking plans, consent and GA4 custom dimensions: use /observability-plan.
  • Prompt quality, token cost and model drift: use /llm-observability-plan.
  • Whether logs and metadata can feed AI security tooling: use /telemetry-readiness-audit.
  • Turning SLOs into a customer-facing commitment: use /sla-design.
  • Running an incident or writing it up: use /incident-response-plan and /incident-postmortem.
  • Product metrics dashboards for PMs and leadership: use /metrics-dashboard.
  • Attacker stories and security acceptance criteria: use /security-review.

Example Output

Run this now

0/4000

Part of these Playbook topics

One tool, one hard lesson. Only when there is something worth sending.

Occasional emails. Unsubscribe any time.