Skip to content

Commit

Permalink
add instument.server.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
s1gr1d committed Jul 10, 2024
1 parent 32a1198 commit 644c8d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"preview": "NODE_OPTIONS='--import ./public/instrument.server.mjs' nuxt preview",
"postinstall": "nuxt prepare",
"clean": "npx nuxi cleanup"
},
Expand Down
9 changes: 9 additions & 0 deletions apps/nuxt/public/instrument.server.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Sentry from '@sentry/nuxt';

if(process.env.SENTRY_DSN) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1,
debug: true,
});
}
7 changes: 0 additions & 7 deletions apps/nuxt/sentry.server.config.js

This file was deleted.

0 comments on commit 644c8d4

Please sign in to comment.