28 lines
633 B
TypeScript
28 lines
633 B
TypeScript
import * as Sentry from "@sentry/nextjs";
|
|
|
|
if (
|
|
process.env.NEXT_PUBLIC_SENTRY_DSN &&
|
|
document.location.hostname !== "localhost"
|
|
) {
|
|
Sentry.init({
|
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
environment: "production",
|
|
integrations: [
|
|
Sentry.replayIntegration({
|
|
maskAllText: false,
|
|
maskAllInputs: false,
|
|
blockAllMedia: false,
|
|
}),
|
|
],
|
|
tracesSampleRate: 1,
|
|
replaysSessionSampleRate: 0,
|
|
replaysOnErrorSampleRate: 1.0,
|
|
debug: false,
|
|
ignoreErrors: [
|
|
"AbortError: The user aborted a request.",
|
|
"Failed to fetch",
|
|
"Fetch is aborted",
|
|
],
|
|
});
|
|
}
|