Error tracking and analytics (cloud)

The hosted site can report errors to Sentry and product analytics to PostHog. Both are off unless their public keys are set when the web app is built, so self-hosted installs send nothing to either service.

What is collected

Sentry (errors and performance):

PostHog (product analytics):

URLs: before any event leaves the browser or server, each URL keeps only a short allowlist of query parameters (utm_*, ref, checkout, billing, signedout) and loses its fragment. Invitation tokens, sign-in codes, error messages and repository filters are never sent.

Same-origin delivery: events go through this site's own origin, so ad blockers that block Sentry and PostHog domains don't drop them:

The filters live in src/telemetry.ts and are tested in tests/telemetry.test.ts.

Setup (operator)

Set these on the web app (Vercel → Project → Settings → Environment Variables → Production), then redeploy. NEXT_PUBLIC_* values are built into the browser bundle, so a change needs a new build.

VariableValueSecret?
NEXT_PUBLIC_SENTRY_DSNThe project's DSN (Sentry → Project Settings → Client Keys)No (public by design)
SENTRY_ORG, SENTRY_PROJECTOrganization and project slugs, for uploading source mapsNo
SENTRY_AUTH_TOKENAn organization auth token with the project:releases scope (Sentry → Settings → Auth Tokens). Without it, stack traces are minified.Yes
NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATEOptional, 0–1 (default 0.1)No
NEXT_PUBLIC_POSTHOG_PROJECT_TOKENThe project API key, phc_… (PostHog → Project settings)No (public by design)
NEXT_PUBLIC_POSTHOG_HOSThttps://us.i.posthog.com (default) or https://eu.i.posthog.comNo

Release builds: with SENTRY_AUTH_TOKEN set, a build uploads source maps and deletes them from the output, so they are never served publicly. Errors are tagged with the Vercel environment (production or preview) and the commit.

Backend errors: Convex functions are not covered by this setup. On a Convex Pro plan, turn on Sentry under Convex dashboard → Settings → Integrations → Exception Reporting with the same DSN. Otherwise, use the Convex dashboard's logs.

Turning it off

Remove the variables and redeploy. Without NEXT_PUBLIC_SENTRY_DSN:

Without NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN: