Guide · Observability
No Logging in Production: The Problems
Production without logs is flying blind. Here's what can go wrong and how to fix it.
No logs means no evidence—Observability requires retained, searchable production telemetry. Primary control: Observability
Flying blind has a clock cost
Without production logs, a payment failure becomes a two-day reproduction hunt instead of a minutes-long search on `request_id`. APRF Observability treats searchable, retained telemetry as mandatory evidence—not a nice-to-have for "when we hire an SRE."
One team had only ad-hoc prints in staging. A user-reported payment error had no trail in prod; they recreated traffic until they guessed the path. Structured logs with a request ID would have pointed at the failing dependency immediately.
Minimum viable Observability
- JSON fields: `request_id`, route, status, latency, error class—not free-form essays
- Propagate the ID across services and into AI/tool spans when you have them
- Levels: ERROR / WARN / INFO; never passwords, raw tokens, or unnecessary PII
- Ship off-box: CloudWatch, Datadog, or equivalent—disk on one pod is not a plan
- Retain long enough to debug (often ~30 days; longer if audit needs it)
Make it usable under stress
Dashboards and alerts that page on error-rate spikes beat scrolling raw files during an incident. Document the field conventions so every service speaks the same shape. Logging only in development is how production stays dark.
Next: Observability
Open the related pillar specification for mandatory checks, artifacts, and pass conditions. Self-attest is optional.
Related
Frequently asked questions
- What happens if I have no logging in production?
- You can't trace failures, debug issues, or audit actions. Diagnosing problems takes hours or days instead of minutes. Structured logging is essential for production.
- What is structured logging?
- Structured logging uses JSON with consistent fields (request_id, user_id, error, timestamp). It makes logs searchable and traceable across services.
- How do I add logging to production?
- Use a structured logger (Winston, Pino). Add request_id to each request. Send logs to CloudWatch or similar. Avoid logging sensitive data.