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' }); + } }