Skip to content

Commit ac0474c

Browse files
committed
Revert "instrumentation.tsでsentryをトップレベルimportしない"
This reverts commit ae747fa.
1 parent b673c21 commit ac0474c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

instrumentation.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as Sentry from "@sentry/nextjs";
12
export async function register() {
23
if (process.env.NEXT_RUNTIME === "nodejs") {
34
await import("./sentry.server.config");
@@ -7,8 +8,4 @@ export async function register() {
78
}
89
}
910
// Capture errors from Server Components, middleware, and proxies
10-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
11-
export async function onRequestError(e: unknown, r: any, ec: any) {
12-
const { captureRequestError } = await import("@sentry/nextjs");
13-
captureRequestError(e, r, ec);
14-
}
11+
export const onRequestError = Sentry.captureRequestError;

0 commit comments

Comments
 (0)