File tree Expand file tree Collapse file tree 4 files changed +32
-67
lines changed
src/server/routes/api/core/backends Expand file tree Collapse file tree 4 files changed +32
-67
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ export default defineNuxtConfig({
4747 pages : true ,
4848 srcDir : 'src' ,
4949 debug : ! ! process . env . DEBUG ,
50+ // Generate client sourcemaps for clearer stack traces in Sentry
51+ sourcemap : { client : 'hidden' } ,
5052 devServer : {
5153 port : 3000 ,
5254 ...sslCfg ,
@@ -88,6 +90,9 @@ export default defineNuxtConfig({
8890 'nuxt-monaco-editor' ,
8991 ...setupApp ( ) ,
9092 ] ,
93+ sentry : {
94+ // autoInjectServerSentry: "top-level-import",
95+ } ,
9196 auth : {
9297 globalMiddleware : true ,
9398 rewriteRedirects : true ,
Original file line number Diff line number Diff line change 1010 "generate" : " nuxt generate" ,
1111 "preview" : " nuxt preview" ,
1212 "postinstall" : " nuxt prepare" ,
13- "start" : " node .output/server/index.mjs" ,
13+ "start" : " node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs" ,
1414 "start:prod" : " node start.mjs" ,
1515 "lint" : " eslint ." ,
1616 "lint:fix" : " eslint --ext .ts,.js,.vue --ignore-path .gitignore . --fix"
2525 "@nyariv/sandboxjs" : " ^0.8.25" ,
2626 "@pinia/nuxt" : " ^0.11.2" ,
2727 "@quasar/extras" : " ^1.17.0" ,
28+ "@sentry/nuxt" : " ^10.25.0" ,
2829 "@vueuse/router" : " ^13.9.0" ,
2930 "ajv" : " ^8.17.1" ,
3031 "ajv-errors" : " ^3.0.0" ,
7172 "string-width" : " ^1.0.2 || 2 || 3 || 4"
7273 },
7374 "packageManager" : " yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
74- }
75+ }
Original file line number Diff line number Diff line change 11import * as Sentry from '@sentry/nuxt'
2+ import { useRuntimeConfig } from '#imports'
3+
4+ const runtimeConfig = useRuntimeConfig ( )
5+
26Sentry . init ( {
3- dsn : process . env . SESAME_SENTRY_DSN ! ,
7+ // Prefer the Nuxt runtime config for client-side DSN access
8+ dsn : runtimeConfig . public ?. sentry ?. dsn ,
9+
10+ // Attach basic user context (IP/headers) when available
411 sendDefaultPii : true ,
5- } ) ;
12+
13+ // Performance: capture a sample of transactions (adjust in production)
14+ tracesSampleRate : 1.0 ,
15+
16+ // Session Replay: capture 10% of sessions and 100% on error
17+ replaysSessionSampleRate : 0.1 ,
18+ replaysOnErrorSampleRate : 1.0 ,
19+
20+ // Browser Console logs to Sentry (verbose in dev only)
21+ enableLogs : process . env . NODE_ENV === 'development' ,
22+
23+ // Enable Replay
24+ integrations : [ Sentry . replayIntegration ( ) ] ,
25+ } )
26+
27+ console . log ( 'Sentry client initialized with DSN:' , runtimeConfig . public ?. sentry ?. dsn )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments