Openstatus
www.openstatus.dev
1// This file configures the initialization of Sentry on the client.
2// The config you add here will be used whenever a users loads a page in their browser.
3// https://docs.sentry.io/platforms/javascript/guides/nextjs/
4
5import * as Sentry from "@sentry/nextjs";
6
7Sentry.init({
8 dsn: process.env.NEXT_PUBLIC_SENTRY_DSN_FRONTEND,
9
10 // Adjust this value in production, or use tracesSampler for greater control
11 tracesSampleRate: 0.5,
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 replaysOnErrorSampleRate: 1.0,
17
18 // This sets the sample rate to be 10%. You may want this to be 100% while
19 // in development and sample at a lower rate in production
20 replaysSessionSampleRate: 0.1,
21
22 // You can remove this option if you're not planning to use the Sentry Session Replay feature:
23 integrations: [
24 Sentry.replayIntegration({ maskAllText: true, blockAllMedia: true }),
25 Sentry.captureConsoleIntegration({ levels: ["error"] }),
26 ],
27});
28
29export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
30
31export const onRequestError = Sentry.captureRequestError;