Leave Localhost logoLeave LocalhostDocs
Observability

Observability Overview

Leave Localhost comes pre-configured with essential observability tools for production monitoring:

Leave Localhost comes pre-configured with essential observability tools for production monitoring:

  1. Logging: Convex-native structured logs on the backend (with optional log streaming to Axiom, Datadog, or a webhook), and platform console logs in the Next.js apps.
  2. Analytics: Product usage and event tracking with PostHog (the built-in analytics integration; optional and disabled by default).
  3. Error Tracking: Exception monitoring and stack traces with Sentry.

The Approach

The starter separates these concerns:

  • Logs are for system health, debugging, and tracing execution paths.
  • Analytics are for understanding user behavior and business metrics.
  • Error Tracking is for identifying, triaging, and fixing bugs.
  • Audit logs (Convex audit_events) are the authoritative record of security-sensitive actions and are deliberately separate from analytics.

Packages

Observability logic is centralized in dedicated packages:

  • packages/analytics — The provider-neutral analytics boundary with PostHog and no-op implementations (the Convex backend facade lives in packages/backend/convex/analytics).

The Next.js apps (apps/app and apps/marketing) import these packages, ensuring consistent configuration across the monorepo.

Next Reads

  • Logging — backend logging via Convex and app console logs.
  • Analytics (PostHog) — how to track product events with PostHog.
  • Sentry — setting up error tracking.
  • Error Handling — the structured error pattern used in Convex functions.

On this page