27 lines
908 B
TypeScript
27 lines
908 B
TypeScript
import * as Sentry from "@sentry/nextjs"
|
|
|
|
import { env } from "./env/client"
|
|
import { denyUrls } from "./instrumentation"
|
|
|
|
Sentry.init({
|
|
dsn: "https://130a3188ceac7bbf7b628ab511024956@o4508102497206272.ingest.de.sentry.io/4509587678167121",
|
|
environment: env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
|
|
enabled: env.NEXT_PUBLIC_SENTRY_ENVIRONMENT !== "development",
|
|
tracesSampleRate: env.NEXT_PUBLIC_SENTRY_CLIENT_SAMPLERATE,
|
|
sampleRate: env.NEXT_PUBLIC_SENTRY_CLIENT_SAMPLERATE,
|
|
denyUrls: denyUrls,
|
|
// Disable logs for clients, will probably give us too much noise
|
|
enableLogs: false,
|
|
release: env.NEXT_PUBLIC_RELEASE_TAG || undefined,
|
|
beforeSendLog(log) {
|
|
const ignoredLevels: (typeof log.level)[] = ["debug", "trace", "info"]
|
|
if (ignoredLevels.includes(log.level)) {
|
|
return null
|
|
}
|
|
|
|
return log
|
|
},
|
|
})
|
|
|
|
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart
|