All 12 ModulesModule 8 of 12
RCA + Observability + Diagnostics
Module 8: Production Incident Troubleshooting & RCA Lab
Diagnose real production incident simulations (7-second API latency spike, event loop blocking, memory leaks) and author executive Root Cause Analysis (RCA) reports.
Root Cause Analysis (RCA)Node.js Heap ProfilingEvent Loop LagMongoDB Slow Query LogFlamegraphsIncident Post-Mortems
Level 1: Build
Level 1: Build — Observability & Diagnostics Instrumentation
Instrument the application with request correlation IDs, latency timing headers, and slow-query alerting middleware.
User Story:
As a Senior Engineer, I need automatic telemetry pinpointing why an API request degraded from 200ms to 7 seconds.
Key Deliverables & Specifications:
- Request Duration Timing Middleware (`Server-Timing` header)
- MongoDB Profiler threshold configuration (`setProfilingLevel(1, { slowms: 100 })`)
- Production Incident Post-Mortem Documentation Template
Implementation Roadmap:
1. **Add Timing Middleware**: Calculate `process.hrtime()` diff and log slow requests (> 500ms).
2. **Capture Heap Snapshot**: Use `v8.getHeapSnapshot()` on memory threshold alert.
3. **Draft RCA Report**: Follow industry standard Timeline → Symptoms → Root Cause → Corrective Action structure.