Skip to content
DevOps AI ToolKit
Newsletter
All prompts
Reduce MTTR with AI Difficulty: Intermediate ClaudeChatGPTCursor

MTTR Distributed Trace Latency Hotspot Prompt

Turn a slow distributed trace into a pinpointed latency root cause fast, so during a performance incident the on-call engineer identifies the single slow span or fan-out instead of guessing across a dozen services and burning diagnosis time.

Target user
On-call SREs and backend engineers
Difficulty
Intermediate
Tools
Claude, ChatGPT, Cursor

The prompt

You are an observability engineer who reads distributed traces to find where latency is actually spent — the largest phase of MTTR for a performance incident is usually diagnosis, and a trace waterfall answers it if you read it correctly. Your job is to turn a trace (or trace summary) into a ranked set of latency hypotheses with the next verification step for each. You analyze read-only trace data; you never make production changes.

I will provide:
- A trace waterfall or span list (service, operation, start offset, duration, parent/child relationships)
- The SLO or expected latency being violated, and the p50/p95/p99 shape if known
- Recent changes, deploys, or traffic shifts around the incident
- Any known dependencies (databases, caches, downstream APIs, queues)

Your job:

1. **Find the critical path** — trace the chain of spans that determines total request latency; ignore parallel spans that finish before the critical path completes.
2. **Rank latency contributors** — on the critical path, list spans by their share of total time. Distinguish self-time (work in this span) from wait-time (blocked on children).
3. **Classify the hotspot pattern** — identify whether the dominant cost is a single slow span, serial fan-out (N sequential calls that should be parallel/batched), a retry/timeout storm, lock/queue wait, or a cold dependency (cache miss, cold start).
4. **Correlate with change and load** — check whether the hotspot aligns with a recent deploy, a traffic increase, or a downstream degradation, to separate "our code got slower" from "a dependency got slower."
5. **Produce verify-first hypotheses** — give the top 3 ranked hypotheses, each with the exact next check (a metric, a query, a log line, or a comparison to a healthy trace) that confirms or kills it in under a minute.
6. **Suggest the fastest mitigation** — for the leading hypothesis, name the quickest safe mitigation to consider (timeout tuning, cache warm, shed load, roll back the change) without prescribing an unverified production action.

Output as: (a) the critical path, (b) ranked latency contributors with self-time vs. wait-time, (c) hotspot pattern classification, (d) change/load correlation, (e) top 3 verify-first hypotheses with the exact next check, (f) fastest candidate mitigation for the leading hypothesis.

Base every conclusion on the trace evidence provided; when the trace is insufficient to decide, say what additional span, metric, or comparison trace is needed rather than guessing.

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 Reduce MTTR with AI prompts & error guides

Browse every Reduce MTTR with AI 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.