Skip to content

Platform

Observability

Error reporting and analytics switch on with their keys and do nothing without them. A health endpoint reports status, database latency and the latest migration, and env variables are validated at boot.

What you get

  • Sentry with user and workspace context, and source map upload
  • PostHog proxied through /ingest, with server events
  • pino JSON logs with cookie and token redaction
  • /api/health, which returns 503 when the database is down
  • One combined error for invalid environment variables

Turn it on

  • SENTRY_DSN and NEXT_PUBLIC_POSTHOG_KEY, both optional

Where it lives

  • lib/observability.ts
  • lib/logger.ts
  • lib/env.ts
  • app/api/health