Merged in fix/sentry-imports (pull request #3228)
feat(sentry): changed imports so they work in netlify functions * feat(sentry): changed imports so they work in netlify functions Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user