From bc6bb63c32dc84be5d3b00388618d53f04f64e35 Mon Sep 17 00:00:00 2001 From: Sergey Mankovsky Date: Tue, 24 Feb 2026 17:55:14 +0100 Subject: [PATCH] fix: enable sentry on frontend (#876) --- .pre-commit-config.yaml | 2 +- www/.env.example | 2 +- www/.env.selfhosted.example | 2 +- www/instrumentation-client.ts | 2 +- www/sentry.edge.config.ts | 2 +- www/sentry.server.config.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3863095d..d8726752 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: format name: run format language: system - entry: bash -c 'source "$HOME/.nvm/nvm.sh" && cd www && pnpm format' + entry: bash -c 'if [ -f "$HOME/.nvm/nvm.sh" ]; then source "$HOME/.nvm/nvm.sh"; fi; cd www && pnpm format' pass_filenames: false files: ^www/ diff --git a/www/.env.example b/www/.env.example index 1d0b1d20..bac07dbb 100644 --- a/www/.env.example +++ b/www/.env.example @@ -27,5 +27,5 @@ WEBSOCKET_URL=ws://127.0.0.1:1250 AUTH_CALLBACK_URL=http://localhost:3000/auth-callback # Sentry -# SENTRY_DSN=https://your-dsn@sentry.io/project-id +# NEXT_PUBLIC_SENTRY_DSN=https://your-dsn@sentry.io/project-id # SENTRY_IGNORE_API_RESOLUTION_ERROR=1 diff --git a/www/.env.selfhosted.example b/www/.env.selfhosted.example index d2eff78f..08cebd10 100644 --- a/www/.env.selfhosted.example +++ b/www/.env.selfhosted.example @@ -50,4 +50,4 @@ AUTHENTIK_REFRESH_TOKEN_URL= # ======================================================= # Sentry (Optional) # ======================================================= -# SENTRY_DSN= +# NEXT_PUBLIC_SENTRY_DSN= diff --git a/www/instrumentation-client.ts b/www/instrumentation-client.ts index 5ea5e2e9..704ac68f 100644 --- a/www/instrumentation-client.ts +++ b/www/instrumentation-client.ts @@ -4,7 +4,7 @@ import * as Sentry from "@sentry/nextjs"; -const SENTRY_DSN = process.env.SENTRY_DSN; +const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN; if (SENTRY_DSN) { Sentry.init({ diff --git a/www/sentry.edge.config.ts b/www/sentry.edge.config.ts index c0127472..5244581d 100644 --- a/www/sentry.edge.config.ts +++ b/www/sentry.edge.config.ts @@ -5,7 +5,7 @@ import * as Sentry from "@sentry/nextjs"; -const SENTRY_DSN = process.env.SENTRY_DSN; +const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN; if (SENTRY_DSN) { Sentry.init({ diff --git a/www/sentry.server.config.ts b/www/sentry.server.config.ts index be9622fd..16cbbabd 100644 --- a/www/sentry.server.config.ts +++ b/www/sentry.server.config.ts @@ -4,7 +4,7 @@ import * as Sentry from "@sentry/nextjs"; -const SENTRY_DSN = process.env.SENTRY_DSN; +const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN; if (SENTRY_DSN) { Sentry.init({