Back to guides

Guide · Observability

How to Debug Production Without Logs

Production broke and you have no logs. Here's how to triage and fix the gap—and prevent it next time.

Blind production systems fail Observability—structured logs and correlation IDs are mandatory. Primary control: Observability

You're flying without instruments

Production is failing and the log stream is empty, unstructured, or missing the request that mattered. Diagnosis stretches into days of reproduction instead of minutes of search. One team spent two days recreating a payment failure that request IDs and structured logs would have surfaced immediately.

Survive this incident

Reproduce with the same inputs if you can. Add temporary, targeted logs on the failing path and ship them—better a noisy hotfix than another blind night. Check error rate, latency, and saturation metrics; they often point at the subsystem even when lines are missing. If any correlation ID exists (CDN, API Gateway, client header), chase it across services. Capture stack traces via Sentry or equivalent while you stabilize.

Never debug blind again

Ship JSON logs with `request_id`, level, and safe fields (no secrets/PII). Centralize in CloudWatch or Datadog; add APM when you cross service boundaries. APRF Observability treats detectable failures as a gate—logs and traces are how you prove you can investigate, not optional polish.

Next: Observability

Open the related pillar specification for mandatory checks, artifacts, and pass conditions. Self-attest is optional.

Frequently asked questions

How do I debug production when I have no logs?
Try to reproduce locally. Add temporary logging for the failing path. Check metrics and error rates. Add structured logging so this doesn't happen again.
What should I add for production debugging?
Structured logging with request_id, error, and timestamp. Send logs to CloudWatch or similar. Use request tracing across services.
How do I prevent debugging without logs?
Add structured logging before you need it. Use request IDs, send logs to a central store, and set up error tracking (e.g., Sentry).