From a284b70a64d399337377237b0be608f5e02bc126 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Wed, 22 Apr 2026 14:40:23 +0100 Subject: [PATCH] chore: explicitly skip the Vercel OTEL when running open-next --- apps/site/instrumentation.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/site/instrumentation.ts b/apps/site/instrumentation.ts index b953218a3e1e9..86097a48800b1 100644 --- a/apps/site/instrumentation.ts +++ b/apps/site/instrumentation.ts @@ -1,5 +1,7 @@ -import { registerOTel } from '@vercel/otel'; - -export function register() { - registerOTel({ serviceName: 'nodejs-org' }); +export async function register() { + if (!('Cloudflare' in globalThis)) { + // Note: we don't need to set up the Vercel OTEL if the application is running on Cloudflare + const { registerOTel } = await import('@vercel/otel'); + registerOTel({ serviceName: 'nodejs-org' }); + } }