Files
orangecat/docs/devops/observability.md
T
Your NameandClaude 2872828779 chore: version 0.1.1 deployment - fix configuration and dependencies
- Bump version to 0.1.1 for tracking
- Add webpack-bundle-optimizer script for Next.js config
- Simplify ESLint configuration to resolve missing dependencies
- Prepare for production deployment with proper version control

This deployment includes:
- Profile update fixes with banner_url support
- LN address validation
- Auth cookie fixes for profile updates
- Various documentation and testing improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 09:30:45 +02:00

976 B

Observability

Health

  • GET /api/health returns overall status and dependency checks (Supabase, Redis), 200 when healthy/degraded, 503 when unhealthy.

Metrics (Prometheus)

  • GET /api/metrics (enable with METRICS_ENABLED=true; optional bearer METRICS_TOKEN).
  • Default Node metrics + orangecat_app_up gauge.
  • Prometheus scrape configured in deployment/production/monitoring/prometheus.yml.
  • HTTP request metrics: http_requests_total and http_request_duration_seconds via a lightweight wrapper (src/lib/api/withMetrics.ts). Example usage wired into /api/health.

Logs (Loki + Promtail)

  • Promtail scrapes Docker JSON logs and ships to Loki.
  • Grafana dashboards/datasources provisioned under deployment/production/monitoring/grafana/.

CSP Reporting

  • Enforced CSP with optional report-only mirror to /api/csp-report.
  • Review CSP reports periodically and tighten sources.
  • Toggle report-only via CSP_REPORT_ONLY=true in the build environment.