-
Notifications
You must be signed in to change notification settings - Fork 1
/
sentry.client.config.js
31 lines (27 loc) · 1.09 KB
/
sentry.client.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// This file configures the initialization of Sentry on the browser.
// The config you add here will be used whenever a page is visited.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import { BrowserClient, makeFetchTransport, defaultStackParser, getCurrentScope } from "@sentry/nextjs";
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
if (SENTRY_DSN) {
// To only use what we need and keep the bundle size smaller
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/tree-shaking/
const client = new BrowserClient({
debug: false,
dsn: SENTRY_DSN,
integrations: [],
tracesSampleRate: 0,
environment: process.env.ENV,
ignoreErrors: [
'ResizeObserver loop limit exceeded',
'ResizeObserver loop completed with undelivered notifications.',
'ResizeObserver is not defined',
"Can't find variable: ResizeObserver",
"Could not load image blob:"
],
transport: makeFetchTransport,
stackParser: defaultStackParser,
});
getCurrentScope().setClient(client);
client.init();
}