Log and Trace Analysis

Turn a pile of logs, traces, or metrics into a timeline, a ranked set of hypotheses, and the one query that would confirm the top one.

Logs, traces, or metric output:
"""
[PASTE THE RAW LOGS, TRACE SPANS, OR METRIC SERIES. INCLUDE THE PERIOD BEFORE THE PROBLEM STARTED, NOT ONLY THE FAILING WINDOW.]
"""

Analyze the material above.

What users reported and when: [SYMPTOM + TIME, WITH TIMEZONE]
System shape: [SERVICES INVOLVED AND WHAT CALLS WHAT]
What changed recently: [DEPLOYS, CONFIG, TRAFFIC, DEPENDENCIES, WITH TIMES]
What I have already ruled out: [AND HOW]

Produce:

1. **Timeline.** The events in chronological order with timestamps normalized to one timezone. Mark the first anomalous entry, which is rarely the first error: it is usually a latency rise, a retry, a pool warning, or a queue depth change some minutes earlier. Distinguish the first symptom from the first cause candidate.

2. **Signal versus noise.** Which log lines are related to this incident and which are the constant background this system always emits. Say which ones you are setting aside and why, since a familiar error that is always present is not evidence.

3. **Ranked hypotheses**, at most three, each with the mechanism stated as cause and effect, the specific evidence in the material that supports it, and the evidence that would contradict it. If the material genuinely cannot distinguish between two hypotheses, say so instead of picking the more interesting one.

4. **The discriminating query.** For the top hypothesis, the single query, log filter, or trace search that would confirm or kill it, written for [MY TOOLING: Datadog, Grafana, CloudWatch, Splunk, OpenSearch, plain grep], plus what result means which.

5. **What is missing.** The instrumentation that would have made this obvious: the field not logged, the span not traced, the metric not recorded, the correlation ID not propagated. This is the durable output of the investigation.

6. **Blast radius.** From the evidence, who and what was affected, over what window, and whether it is still happening.

Rules: quote the exact log lines you are reasoning from. Do not infer a root cause the material does not support; "the logs are consistent with A and B, and here is how to tell them apart" is the correct answer more often than a confident single cause. Correlation with a deploy time is a hypothesis, not a conclusion.

How to use

Paste the quiet period before the failure, not just the loud part. The first error is almost never the first anomaly, and the entry that explains the incident is usually an unremarkable latency or queue-depth line several minutes earlier that nobody scrolls back far enough to see. Section 5 is what makes the investigation pay off twice: every incident is a free list of the fields you wish you had been logging.

Originated fromStan SedberryUpdated
Debuggingadvanced

More coding prompts

Write the commit message for this change.

Diff:
"""
[PASTE THE STAGED DIFF]
"""

Why I made this change: [THE REASON, THE TICKET, THE BUG REPORT, or "you infer it"]
Convention: [Conventional Commits / this repo's existing style, pasted below / plain]
Recent commits from this repo, to match style:
"""
[PASTE 5-10 RECENT COMMIT SUBJECT LIN

Commit Message

Write a commit message that explains why the change was made, in Conventional Commits format, split into separate commits when needed.

Codingbeginner
Help me recover from a git mistake without making it worse.

What I was trying to do: [THE GOAL]
What I ran: [THE EXACT COMMANDS, IN ORDER]
What happened instead: [THE OUTPUT OR THE STATE NOW]
Has this been pushed or shared: [YES/NO, and to which branch and whether anyone else has pulled]
Uncommitted work I cannot lose: [WHAT AND WHERE, o

Undo a Git Mistake

Recover from a bad commit, force push, wrong branch, or lost work with a reversible plan and the exact commands, explained before you run them.

Codingintermediate
Handler code, routes, and models:
"""
[PASTE THE ROUTE DEFINITIONS, HANDLERS, REQUEST AND RESPONSE TYPES, VALIDATION SCHEMAS, AND MIDDLEWARE]
"""

Generate an OpenAPI 3.1 specification from the code above.

API name, version, and base URL: [DETAILS]
Auth scheme: [BEARER JWT / API KEY / OAUTH / SESSION COOKIE, and where it is enforced]
Con

OpenAPI Spec From Code

Generate an accurate OpenAPI 3.1 spec from handler code, including error responses and auth, with gaps flagged instead of invented.

Codingintermediate

Search prompts

Find a prompt by title, description, tag, or category.