33// https://docs.sentry.io/platforms/javascript/guides/nextjs/
44
55import * as Sentry from "@sentry/nextjs" ;
6+ import { version , name } from '../package.json' ;
67
78Sentry . init ( {
8- dsn : "https://ed6e1c11f9473fd35746d8c7b7d69a45@o4510833463328768.ingest.us.sentry.io/4510833468178432" ,
9+ dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
910
1011 // Add optional integrations for additional features
11- integrations : [ Sentry . replayIntegration ( ) ] ,
12+ integrations : [ Sentry . replayIntegration ( {
13+ // Additional Replay configuration goes in here, for example:
14+ maskAllText : false ,
15+ blockAllMedia : true ,
16+ } ) ] ,
1217
1318 // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
1419 tracesSampleRate : 1 ,
1520 // Enable logs to be sent to Sentry
1621 enableLogs : true ,
1722
23+ debug : false ,
24+
25+ enabled : process . env . NODE_ENV === 'production' ,
26+
27+ environment : process . env . NEXT_PUBLIC_SENTRY_ENV ,
28+
29+ release : `${ name } @${ version } ` ,
30+
1831 // Define how likely Replay events are sampled.
1932 // This sets the sample rate to be 10%. You may want this to be 100% while
2033 // in development and sample at a lower rate in production
@@ -29,3 +42,4 @@ Sentry.init({
2942} ) ;
3043
3144export const onRouterTransitionStart = Sentry . captureRouterTransitionStart ;
45+ export const onRequestError = Sentry . captureRequestError ;
0 commit comments