Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Incident Response Difficulty: Advanced ClaudeChatGPTCursor

p99 Tail Latency Spike Live Incident Diagnosis Prompt

Diagnose a live tail-latency incident where p99/p95 has spiked while averages look fine — separating a slow dependency, saturation, GC/lock contention, a hot shard, or a retry storm — so the on-call finds the real source instead of chasing green median dashboards.

Target user
On-call SREs and senior engineers diagnosing latency-SLO breaches during active incidents
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior SRE leading a live incident where tail latency has spiked — p99 (and maybe p95) is breaching SLO while the average/median look almost normal. Guide me through a rigorous diagnosis, asking for the specific signals you need rather than guessing at the architecture.

I will provide:
- The service and its request path (upstream callers, this service, downstream dependencies: DBs, caches, external APIs, queues)
- Latency percentiles over time (p50/p95/p99/p999), where they are measured (client vs. server vs. LB), and error-rate/throughput alongside
- Whether the spike is uniform or concentrated (one endpoint, one region/AZ, one shard/tenant, one instance)
- Recent changes: deploys, config/flag changes, traffic mix shifts, a dependency incident
- Access: tracing (distributed traces), metrics, logs, profilers, DB slow-query views

Work through this in order:

1. **Characterize the tail** — Establish whether it is a raised floor (everything slower) or a fat tail (most requests fine, a slice very slow). Ask for the percentile spread and whether the slowness is per-endpoint, per-instance, per-shard, or per-region. A fat tail concentrated on one shard/instance points somewhere very different from a uniform slowdown.

2. **Walk the request path** — Use tracing to attribute the latency: which span/hop grew? Rank hypotheses — a slow downstream dependency, resource saturation (CPU/thread-pool/connection-pool/IO), GC or lock/contention pauses, a hot key/shard or N+1 query, cache-miss cliff, network/AZ issue, or a retry storm amplifying a small upstream slowdown. State your top hypothesis and the one trace or metric that confirms it.

3. **Targeted diagnostics** — Give me concrete steps for my stack: pull an exemplar slow trace and read where time is spent; check connection-pool/thread-pool saturation and queue depth; GC pause logs / runtime pause metrics; DB slow-query and lock/wait stats; per-instance and per-AZ latency breakdowns to isolate a bad node/zone; and whether retry counts are climbing. Tell me what healthy vs. pathological looks like for each.

4. **Decide the mitigation** — Recommend the least-blast-radius stabilizing action: shed load or cap concurrency, evict/drain a bad instance or AZ, roll back the suspected change, fix pool sizing, or address the hot shard — and be explicit about the danger of naive timeout/retry increases causing a retry storm. For each option: what it fixes, what it risks, how to verify.

5. **Confirm recovery** — Define success by the tail, not the average: p99/p95 back under SLO and stable for N minutes, retries normal, no shifting of the problem to another hop.

6. **Handoff** — Produce a timeline: when the tail broke, the attributed source, what we changed and why, and follow-ups (percentile-based alerting if the median-only alert missed this, pool/timeout tuning, hot-shard mitigation, dependency SLO review).

Ask clarifying questions when the signals are ambiguous. Bias toward attributing latency with traces before acting, protecting against retry amplification, and judging recovery on the tail rather than green median dashboards.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Incident Response prompts & error guides

Browse every Incident Response prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.