Skip to content

Commit a121d89

Browse files
committed
feat(nextjs): Upgrade sentry to v8
1 parent b429754 commit a121d89

File tree

5 files changed

+15369
-5666
lines changed

5 files changed

+15369
-5666
lines changed

apps/nextjs-14_2_1/instrumentation.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import * as Sentry from '@sentry/nextjs';
22

3-
export function register() {
4-
if (process.env.NEXT_RUNTIME === 'nodejs' || process.env.NEXT_RUNTIME === 'edge') {
5-
Sentry.init({
6-
environment: 'qa', // dynamic sampling bias to keep transactions
7-
dsn: process.env.SENTRY_DSN,
8-
includeLocalVariables: true,
9-
tunnel: `http://localhost:3031/`, // proxy server
10-
tracesSampleRate: 1,
11-
});
3+
export async function register() {
4+
if (process.env.NEXT_RUNTIME === 'nodejs') {
5+
await import('./sentry.server.config');
6+
}
7+
8+
if (process.env.NEXT_RUNTIME === 'edge') {
9+
await import('./sentry.edge.config');
1210
}
1311
}

apps/nextjs-14_2_1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lint": "next lint"
1111
},
1212
"dependencies": {
13-
"@sentry/nextjs": "8.0.0-beta.3",
13+
"@sentry/nextjs": "8.9.2",
1414
"next": "14.2.1",
1515
"react": "^18",
1616
"react-dom": "^18"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as Sentry from '@sentry/nextjs';
2+
3+
Sentry.init({
4+
environment: 'qa', // dynamic sampling bias to keep transactions
5+
dsn: process.env.SENTRY_DSN,
6+
includeLocalVariables: true,
7+
tunnel: `http://localhost:3031/`, // proxy server
8+
tracesSampleRate: 1,
9+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as Sentry from '@sentry/nextjs';
2+
3+
Sentry.init({
4+
environment: 'qa', // dynamic sampling bias to keep transactions
5+
dsn: process.env.SENTRY_DSN,
6+
includeLocalVariables: true,
7+
tunnel: `http://localhost:3031/`, // proxy server
8+
tracesSampleRate: 1,
9+
});

0 commit comments

Comments
 (0)