Skip to content

Commit b429754

Browse files
committed
update nextjs 14.2.1 to Sentry v8
1 parent 2fa28d7 commit b429754

19 files changed

+7303
-19974
lines changed

apps/nextjs-14_2_1/instrumentation.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as Sentry from '@sentry/nextjs';
2+
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+
});
12+
}
13+
}

apps/nextjs-14_2_1/next.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { withSentryConfig } from '@sentry/nextjs';
22

33
/** @type {import('next').NextConfig} */
4-
const nextConfig = {};
4+
const nextConfig = {
5+
experimental: { instrumentationHook: true },
6+
};
57

68
export default withSentryConfig(nextConfig);

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": "7.110.1",
13+
"@sentry/nextjs": "8.0.0-beta.3",
1414
"next": "14.2.1",
1515
"react": "^18",
1616
"react-dom": "^18"

apps/nextjs-14_2_1/sentry.edge.config.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

apps/nextjs-14_2_1/sentry.server.config.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

payload-files/nextjs-14_2_1/route-handlers/_api_test-error--event.json

Lines changed: 274 additions & 347 deletions
Large diffs are not rendered by default.

payload-files/nextjs-14_2_1/route-handlers/_api_test-error--transaction.json

Lines changed: 39 additions & 810 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)