Import Sentry in middleware

This commit is contained in:
Greg Bergé
2025-01-09 09:21:52 +01:00
parent 0784bf5df7
commit fec48ce708
+3
View File
@@ -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());