feat: monitoring retention policy and ingest hardening (#540, #543)#739
feat: monitoring retention policy and ingest hardening (#540, #543)#7392witstudios wants to merge 3 commits intomasterfrom
Conversation
… security_audit_log (#540) Add time-based retention cleanup for monitoring tables that previously grew unbounded. Defaults: api_metrics 90d, system_logs 30d, security_audit_log 365d. Configurable via RETENTION_*_DAYS env vars. Integrated into existing runRetentionCleanup pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ation (#543) Redact query parameters from URLs before storage in api_metrics and system_logs. Sanitize ingest payloads (truncate error/stack/userAgent, clamp duration, strip query field). Downgrade missing MONITORING_INGEST_KEY from error to warning for graceful degradation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The runRetentionCleanup function now returns 12 results (9 original + 3 monitoring tables) after integrating monitoring retention cleanup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
api_metrics90d,system_logs30d,security_audit_log365d — configurable viaRETENTION_*_DAYSenv varsMONITORING_INGEST_KEYrunRetentionCleanuppipelineChanges
packages/lib/src/compliance/retention/monitoring-retention.ts— new retention cleanup functionsapps/web/src/lib/monitoring/ingest-sanitizer.ts— URL redaction, payload sanitizationapps/web/src/middleware/monitoring.ts— apply endpoint sanitization, remove query from payloadsapps/web/src/app/api/internal/monitoring/ingest/route.ts— apply sanitizer, improve missing key handlingTest plan
🤖 Generated with Claude Code