Skip to content

Commit c9c248f

Browse files
authored
Merge pull request #28 from chrisweb/preview
sentry files update
2 parents a98542d + 8a6270c commit c9c248f

4 files changed

+39
-30
lines changed

instrumentation.ts

+3-29
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,9 @@
1-
import * as Sentry from '@sentry/nextjs'
2-
3-
export function register() {
1+
export async function register() {
42
if (process.env.NEXT_RUNTIME === 'nodejs') {
5-
Sentry.init({
6-
dsn: 'https://daf0befe66519725bbe2ad707a11bbb3@o4504017992482816.ingest.us.sentry.io/4506763918770176',
7-
8-
// Adjust this value in production, or use tracesSampler for greater control
9-
tracesSampleRate: 1,
10-
11-
// Setting this option to true will print useful information to the console while you're setting up Sentry.
12-
debug: false,
13-
14-
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
15-
// spotlight: process.env.NODE_ENV === 'development',
16-
17-
environment: process.env.NODE_ENV ? process.env.NODE_ENV : '',
18-
19-
})
3+
await import('./sentry.server.config')
204
}
215

226
if (process.env.NEXT_RUNTIME === 'edge') {
23-
Sentry.init({
24-
dsn: 'https://daf0befe66519725bbe2ad707a11bbb3@o4504017992482816.ingest.us.sentry.io/4506763918770176',
25-
26-
// Adjust this value in production, or use tracesSampler for greater control
27-
tracesSampleRate: 1,
28-
29-
// Setting this option to true will print useful information to the console while you're setting up Sentry.
30-
debug: false,
31-
32-
environment: process.env.NODE_ENV ? process.env.NODE_ENV : '',
33-
})
7+
await import('./sentry.edge.config')
348
}
359
}

sentry.client.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (process.env.NODE_ENV === 'development') {
1616
}
1717

1818
Sentry.init({
19-
dsn: 'https://daf0befe66519725bbe2ad707a11bbb3@o4504017992482816.ingest.us.sentry.io/4506763918770176',
19+
dsn: 'https://o4504017992482816.ingest.us.sentry.io/api/4506763918770176/security/?sentry_key=daf0befe66519725bbe2ad707a11bbb3',
2020

2121
// Adjust this value in production, or use tracesSampler for greater control
2222
tracesSampleRate: tracesSampleRate,

sentry.edge.config.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).
2+
// The config you add here will be used whenever one of the edge features is loaded.
3+
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
4+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
5+
6+
import * as Sentry from '@sentry/nextjs'
7+
8+
Sentry.init({
9+
dsn: 'https://o4504017992482816.ingest.us.sentry.io/api/4506763918770176/security/?sentry_key=daf0befe66519725bbe2ad707a11bbb3',
10+
11+
// Adjust this value in production, or use tracesSampler for greater control
12+
tracesSampleRate: 1,
13+
14+
// Setting this option to true will print useful information to the console while you're setting up Sentry.
15+
debug: false,
16+
})

sentry.server.config.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// This file configures the initialization of Sentry on the server.
2+
// The config you add here will be used whenever the server handles a request.
3+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
4+
5+
import * as Sentry from '@sentry/nextjs'
6+
7+
Sentry.init({
8+
dsn: 'https://o4504017992482816.ingest.us.sentry.io/api/4506763918770176/security/?sentry_key=daf0befe66519725bbe2ad707a11bbb3',
9+
10+
// Adjust this value in production, or use tracesSampler for greater control
11+
tracesSampleRate: 1,
12+
13+
// Setting this option to true will print useful information to the console while you're setting up Sentry.
14+
debug: false,
15+
16+
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
17+
// spotlight: process.env.NODE_ENV === 'development',
18+
19+
})

0 commit comments

Comments
 (0)