lobe-chat
/
sentry.client.config.ts
30 строк · 1.1 Кб
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/
4import * as Sentry from '@sentry/nextjs';5
6if (!!process.env.NEXT_PUBLIC_SENTRY_DSN) {7Sentry.init({8// Setting this option to true will print useful information to the console while you're setting up Sentry.9debug: false,10
11dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,12// You can remove this option if you're not planning to use the Sentry Session Replay feature:13integrations: [14Sentry.replayIntegration({15blockAllMedia: true,16// Additional Replay configuration goes in here, for example:17maskAllText: true,18}),19],20
21replaysOnErrorSampleRate: 1,22
23// This sets the sample rate to be 10%. You may want this to be 100% while24// in development and sample at a lower rate in production25replaysSessionSampleRate: 0.1,26
27// Adjust this value in production, or use tracesSampler for greater control28tracesSampleRate: 1,29});30}
31