Merged in fix/application-insights-sentry (pull request #1269)

fix: application insights works again

* fix: application insights works again


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2025-02-06 13:40:12 +00:00
parent da31897835
commit 3d1295e4d5

View File

@@ -3,8 +3,15 @@ import * as Sentry from "@sentry/nextjs"
import { env } from "./env/server"
export async function register() {
await configureSentry()
/*
Order matters!
Sentry hooks into OpenTelemetry, modifying its behavior.
Application Insights relies on OpenTelemetry exporters,
and these may not work correctly if Sentry has already altered the instrumentation pipeline.
*/
await configureApplicationInsights()
await configureSentry()
}
export const onRequestError = Sentry.captureRequestError