postio / libraries /react-shared-libraries /src /sentry /initialize.sentry.client.ts
Leon4gr45's picture
Upload folder using huggingface_hub (part 11)
f2e9a59 verified
Raw
History Blame Contribute Delete
819 Bytes
import * as Sentry from '@sentry/nextjs';
import { initializeSentryBasic } from '@gitroom/react/sentry/initialize.sentry.next.basic';
export const initializeSentryClient = (environment: string, dsn: string) =>
initializeSentryBasic(environment, dsn, {
integrations: [
// Add default integrations back
Sentry.browserTracingIntegration(),
Sentry.browserProfilingIntegration(),
Sentry.replayIntegration({
maskAllText: false,
maskAllInputs: true,
}),
Sentry.feedbackIntegration({
// Disable the injection of the default widget
autoInject: false,
}),
Sentry.replayCanvasIntegration(),
],
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
profilesSampleRate: environment === 'development' ? 1.0 : 0.75,
});