PERF-003 recommended memory-monitoring
Memory leak detection alerting
Automated alerts for memory growth or threshold breaches
Question to ask
"Will you know about a memory leak before your users do?"
What to check
- ☐ Alert configured for memory exceeding threshold
- ☐ OR alert configured for memory growth rate
- ☐ Alert notifies team automatically
Verification guide
Severity: Recommended
Check automatically:
- Look for memory alerting rules:
# Check for memory alerts in monitoring config
grep -riE "memory.*alert|alert.*memory|threshold|oom" --include="*.yaml" --include="*.yml" --include="*.json" . 2>/dev/null | grep -v node_modules | head -10
# Check alerting config files
ls -la alerts/ alerting/ *alerts*.yaml *alerts*.yml 2>/dev/null
# Look for memory threshold configuration
grep -riE "memory.*threshold|max.*memory|memory.*limit|heap.*max" .env.example .env* config/ 2>/dev/null
- Check monitoring tool for alert rules:
- Request list of configured alerts
- Look for memory-related triggers
If not found in code, ask user:
- "Do you have alerts configured for memory growth?"
- "What triggers when memory usage trends upward?"
- "How would you know if a memory leak started?"
Cross-reference with:
- PERF-002 (requires memory tracking to alert on it)
- MON-005 (Section 12 - alerting configuration)
Pass criteria:
- Automated alert exists for memory exceeding threshold, OR
- Automated alert exists for memory growth rate (trend-based)
- Alert notifies team (Slack, PagerDuty, email, etc.)
Fail criteria:
- No alerting on memory issues
- Only OOM-kill as the "detection" (too late)
- Manual review process only (no automation)
Evidence to capture:
- Alert rule configuration or screenshot
- Threshold values configured
- Notification channel for alerts