Skip to content

Commit 6fc0154

Browse files
chore: explicitly skip the Vercel OTEL when running open-next (#8833)
1 parent a26c508 commit 6fc0154

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

apps/site/instrumentation.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { registerOTel } from '@vercel/otel';
2-
3-
export function register() {
4-
registerOTel({ serviceName: 'nodejs-org' });
1+
export async function register() {
2+
if (!('Cloudflare' in globalThis)) {
3+
// Note: we don't need to set up the Vercel OTEL if the application is running on Cloudflare
4+
const { registerOTel } = await import('@vercel/otel');
5+
registerOTel({ serviceName: 'nodejs-org' });
6+
}
57
}

0 commit comments

Comments
 (0)