diff --git a/packages/gitbook/src/middleware.ts b/packages/gitbook/src/middleware.ts index b3a21cf52..ea2997afd 100644 --- a/packages/gitbook/src/middleware.ts +++ b/packages/gitbook/src/middleware.ts @@ -97,6 +97,9 @@ export type LookupResult = PublishedContentWithCache & { * The middleware also takes care of persisting the visitor authentication state. */ export async function middleware(request: NextRequest) { + // Instrumentation is not loaded correctly... + await import('./sentry'); + const { url, mode } = getInputURL(request); setTag('url', url.toString());