chore: explicitly skip the Vercel OTEL when running open-next#8833
chore: explicitly skip the Vercel OTEL when running open-next#8833ovflowd merged 1 commit intonodejs:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit a284b70. Bugbot is set up for automated code reviews on this repo. Configure here. |
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8833 +/- ##
==========================================
- Coverage 73.88% 73.85% -0.04%
==========================================
Files 105 105
Lines 8889 8889
Branches 326 327 +1
==========================================
- Hits 6568 6565 -3
- Misses 2320 2323 +3
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR makes Vercel OpenTelemetry initialization conditional so it’s skipped when running under the Cloudflare open-next runtime, eliminating preview-time terminal telemetry errors and making the deployment intent explicit.
Changes:
- Switch
instrumentation.tsto lazily import@vercel/otelonly when not running on Cloudflare. - Add a Cloudflare runtime check to bypass Vercel-specific OTEL setup.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ovflowd
left a comment
There was a problem hiding this comment.
SGTM! Fast-tracking as a hot-fix for OpenNext.
Description
The Vercel OTEL implementation doesn't work on the open-next build (I haven't investigated why), but it doesn't seem to cause issues either. However it produces some error in the terminal on previews.
In any case for the open-next build Vercel OTEL couldn't be used anyways (since the app wouldn't be hosted on Vercel).
In order to remove the terminal error and also to make the code more clear/explicit this PR is making the Vercel OTEL setup conditional based on whether the application is being run by Cloudflare or not.
Validation
I've validated that the open-next preview now does not present the telemetry error anymore.
Related Issues
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.