diff --git a/apps/scandic-web/netlify/functions/warmup-background.mts b/apps/scandic-web/netlify/functions/warmup-background.mts index 40eec84c1..7d3014590 100644 --- a/apps/scandic-web/netlify/functions/warmup-background.mts +++ b/apps/scandic-web/netlify/functions/warmup-background.mts @@ -1,6 +1,6 @@ import crypto from "node:crypto" -import * as Sentry from "@sentry/nextjs" +import Sentry from "@sentry/nextjs" import jwt from "jsonwebtoken" import { type WarmupFunctionsKey } from "@/services/warmup/warmupKeys" diff --git a/apps/scandic-web/netlify/utils/initSentry.ts b/apps/scandic-web/netlify/utils/initSentry.ts index 123b2dd23..fc56fb406 100644 --- a/apps/scandic-web/netlify/utils/initSentry.ts +++ b/apps/scandic-web/netlify/utils/initSentry.ts @@ -1,16 +1,16 @@ -import * as Sentry from "@sentry/nextjs" +import { captureRequestError, init as sentryInit } from "@sentry/nextjs" export const denyUrls: (string | RegExp)[] = [ // Ignore preview urls /\/.{2}\/preview\//, ] -export const onRequestError = Sentry.captureRequestError +export const onRequestError = captureRequestError export async function configureSentry() { const sentryEnvironment = Netlify.env.get("SENTRY_ENVIRONMENT") const sampleRate = Number(Netlify.env.get("SENTRY_SERVER_SAMPLERATE") ?? 0.01) - Sentry.init({ + sentryInit({ dsn: "https://fe39c070b4154e2f9cc35f0e5de0aedb@o4508102497206272.ingest.de.sentry.io/4508102500286544", environment: sentryEnvironment, enabled: sentryEnvironment !== "development",