Repository navigation
Operations
Operational reference for running nSelf Admin in production.
nSelf Admin supports optional Sentry error reporting. When SENTRY_DSN is set, uncaught runtime errors are forwarded to your Sentry project. When unset, there is no overhead — the Sentry SDK is loaded lazily and has zero import side-effects.
- Create a project in Sentry.
- Copy the DSN from Project Settings → Client Keys (DSN).
- Set it in your
.env.local(local dev) or.env.secrets(production):
SENTRY_DSN=https://xxxxx@o0.ingest.sentry.io/0- Restart nSelf Admin. Errors will appear in your Sentry dashboard.
Leave SENTRY_DSN blank (or unset) to disable. No restart is required after removing the value — the next server restart picks up the change.
Uncaught errors that reach the admin error boundary are reported to Sentry. Each report includes:
- Error message and stack trace
- Component stack (for React errors)
- Page URL and user agent
- Timestamp
Rate limiting is applied: no more than 10 identical errors per minute are forwarded.
- Errors in development mode (unless
ENABLE_ERROR_LOGGING=trueis set) - Rate-limited duplicate errors
- Errors during Sentry SDK initialization itself (logged to console only)
nSelf Admin refuses to start in production with a known dev-stub admin secret. If HASURA_GRAPHQL_ADMIN_SECRET is set to a value containing dummy, or is hasura-admin-secret-dev, or changeme, the process throws:
FATAL: dev-stub HASURA_GRAPHQL_ADMIN_SECRET detected in production.
Set a secure random secret (minimum 32 characters) in .env.secrets for production deployments.
-
src/lib/error-logging.ts— error logging implementation -
src/app/api/graphql/hasura/route.ts— admin secret guard
Version: 1.0.0 | Updated: 2026-10-19 11:40 UTC | GitHub