Files
web/apps/scandic-web/instrumentation-client.ts
Joakim Jäderberg f27ba7ccb6 Merged in chore/release-pipeline (pull request #3352)
Add scripts for handling deployments

Approved-by: Linus Flood
2025-12-16 11:42:51 +00:00

27 lines
908 B
TypeScript

import * as Sentry from "@sentry/nextjs"
import { env } from "./env/client"
import { denyUrls } from "./instrumentation"
Sentry.init({
dsn: "https://fe39c070b4154e2f9cc35f0e5de0aedb@o4508102497206272.ingest.de.sentry.io/4508102500286544",
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