Repository navigation
Expand file tree
/
Copy pathinstrumentation-client.ts
More file actions
40 lines (33 loc) · 1.5 KB
/
Copy pathinstrumentation-client.ts
File metadata and controls
40 lines (33 loc) · 1.5 KB
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
32
33
34
35
36
37
38
39
40
// This file configures the initialization of Sentry on the client.
// The added config here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "https://b64c08759fb6813e9374cb8417d7c621@o4511427214442496.ingest.de.sentry.io/4511427264446544",
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 0.1,
// Logs stay local: console output can contain user file names, which must never leave the device.
enableLogs: false,
// Drop console breadcrumbs for the same reason - they would attach recent console
// messages (potentially including file names) to any captured error event.
beforeBreadcrumb(breadcrumb) {
return breadcrumb.category === "console" ? null : breadcrumb;
},
ignoreErrors: [
"Java bridge method invocation error",
"TypeError: can't access dead object",
/NotFoundError: Failed to execute '(removeChild|insertBefore)' on 'Node'/,
"ResizeObserver loop limit exceeded",
"ResizeObserver loop completed with undelivered notifications",
"Non-Error promise rejection captured",
"Non-Error exception captured",
],
denyUrls: [
/extensions\//i,
/^chrome-extension:\/\//i,
/^moz-extension:\/\//i,
/^safari-extension:\/\//i,
/^safari-web-extension:\/\//i,
],
});
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;