Fix/turn off application insights * remove applicationInsights * remove applicationInsights Approved-by: Linus Flood
18 lines
378 B
TypeScript
18 lines
378 B
TypeScript
import * as Sentry from "@sentry/nextjs"
|
|
|
|
import { isEdge } from "@scandic-hotels/common/utils/isEdge"
|
|
|
|
export async function register() {
|
|
await configureSentry()
|
|
}
|
|
|
|
export const onRequestError = Sentry.captureRequestError
|
|
|
|
async function configureSentry() {
|
|
if (isEdge) {
|
|
await import("./sentry.edge.config")
|
|
} else {
|
|
await import("./sentry.server.config")
|
|
}
|
|
}
|