chore: Sentry performance monitoring (#1841)
* Hook up performance monitoring * lint
This commit is contained in:
28
app/utils/sentry.js
Normal file
28
app/utils/sentry.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// @flow
|
||||
import * as Sentry from "@sentry/react";
|
||||
import { Integrations } from "@sentry/tracing";
|
||||
import { type RouterHistory } from "react-router-dom";
|
||||
import env from "env";
|
||||
|
||||
export function initSentry(history: RouterHistory) {
|
||||
Sentry.init({
|
||||
dsn: env.SENTRY_DSN,
|
||||
integrations: [
|
||||
new Integrations.BrowserTracing({
|
||||
routingInstrumentation: Sentry.reactRouterV5Instrumentation(history),
|
||||
}),
|
||||
],
|
||||
tracesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1,
|
||||
ignoreErrors: [
|
||||
"ResizeObserver loop limit exceeded",
|
||||
"AuthorizationError",
|
||||
"BadRequestError",
|
||||
"NetworkError",
|
||||
"NotFoundError",
|
||||
"OfflineError",
|
||||
"ServiceUnavailableError",
|
||||
"UpdateRequiredError",
|
||||
"ChunkLoadError",
|
||||
],
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user