CRMcy Docs

Monitoring

Metrics, logs, traces, and alerting endpoints.

Last updated 2026-05-05

Observability for CRMcy is built around three pillars: metrics (Prometheus + Grafana), logs (Loki or your preferred aggregator), and traces (OpenTelemetry → your collector of choice). Every app exposes a /metrics endpoint (Prometheus format) on its admin port; the api also exports tenant-aware traces with the tenant id as a span attribute so you can slice by customer. Alerts route through Alertmanager; default rules cover api error rate, worker queue depth, postgres cpu, and certificate expiry.

The status page at https://status.crmcy.app (see the status app) is the public-facing equivalent — it polls each service's health endpoint every 30 seconds and renders a 90-day uptime bar.

Health endpoints

  • GET /api/health — api service liveness.
  • GET /api/healthz (web), GET /api/health (api), GET / (marketing) — used by docker healthchecks and the status page probe.
  • GET /metrics — Prometheus scrape (per app).

Where to look first

  • API errors: Grafana dashboard crmcy-api.
  • Job queue: dashboard crmcy-worker (depth + latency per job type).
  • Postgres: dashboard crmcy-postgres (transactions / sec, replication lag, dead tuples).

See the source at apps/api/src/health and the dashboard JSON at infra/grafana/dashboards/.