Skip to content

chore(open-next): add server-side sentry to open-next site#8830

Merged
dario-piotrowicz merged 7 commits intonodejs:mainfrom
dario-piotrowicz:dario/DEVX-2481/sentry-to-open-next-worker
Apr 22, 2026
Merged

chore(open-next): add server-side sentry to open-next site#8830
dario-piotrowicz merged 7 commits intonodejs:mainfrom
dario-piotrowicz:dario/DEVX-2481/sentry-to-open-next-worker

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Member

Description

This PR adds server-side sentry to the open-next site.

Validation

To be done.

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

Copilot AI review requested due to automatic review settings April 19, 2026 23:00
@dario-piotrowicz dario-piotrowicz requested review from a team as code owners April 19, 2026 23:00
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Apr 22, 2026 3:43pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 19, 2026

PR Summary

Medium Risk
Changes the Cloudflare Worker entrypoint and request handling to add Sentry instrumentation; deployment/runtime behavior and observability bindings may affect production traffic and error reporting if misconfigured.

Overview
Adds a custom Cloudflare Worker entrypoint (cloudflare/worker-entrypoint.ts) that wraps the OpenNext-generated worker with @sentry/cloudflare for server-side error/performance monitoring, tagging each request with IDs and Cloudflare metadata before delegating to the existing handler.

Updates Wrangler to use this new entrypoint and adds version_metadata (CF_VERSION_METADATA) for Sentry release correlation. Adjusts TypeScript/ESLint configs to exclude the entrypoint (and .open-next) from type-aware checks due to a TS compiler crash, and adds the new Sentry/Workers types dependencies (plus lockfile updates).

Reviewed by Cursor Bugbot for commit 9b04e0f. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website @nodejs/web-infra

Please review the changes when you have a chance. Thank you! 🙏

Comment thread apps/site/cloudflare/worker-entrypoint.ts Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.90%. Comparing base (a26c508) to head (9b04e0f).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8830   +/-   ##
=======================================
  Coverage   73.90%   73.90%           
=======================================
  Files         105      105           
  Lines        8889     8889           
  Branches      326      326           
=======================================
  Hits         6569     6569           
  Misses       2319     2319           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread apps/site/cloudflare/worker-entrypoint.ts Outdated

This comment was marked as low quality.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f161be. Configure here.

Comment thread apps/site/cloudflare/worker-entrypoint.ts Outdated
ovflowd

This comment was marked as outdated.

Comment thread apps/site/cloudflare/worker-entrypoint.ts Outdated
@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Apr 20, 2026

@dario-piotrowicz please don't use Copilot. We're using Cursor on this repository for now :)

@dario-piotrowicz
Copy link
Copy Markdown
Member Author

@dario-piotrowicz please don't use Copilot. We're using Cursor on this repository for now :)

oh... I actually didn't do anything (at least I don't think so!)... Copilot just automatically reviewed the PR... 😓

@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Apr 20, 2026

@dario-piotrowicz please don't use Copilot. We're using Cursor on this repository for now :)

oh... I actually didn't do anything (at least I don't think so!)... Copilot just automatically reviewed the PR... 😓

No? You explicitly requested a review from it

image

@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Apr 20, 2026

If that's not the case, I'd recommend you to review your Copilot settings, IDK 😅

@dario-piotrowicz
Copy link
Copy Markdown
Member Author

no, I didn't... 😕 😓 🤷

@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Apr 20, 2026

no, I didn't... 😕 😓 🤷

image

@dario-piotrowicz
Copy link
Copy Markdown
Member Author

If that's not the case, I'd recommend you to review your Copilot settings, IDK 😅

Maybe this was the problem 🤷
Screenshot 2026-04-20 at 16 40 15

I've disabled it now 😅👍

Comment thread apps/site/cloudflare/worker-entrypoint.ts Outdated
Comment thread apps/site/cloudflare/worker-entrypoint.ts
Comment thread apps/site/cloudflare/worker-entrypoint.ts
Comment thread apps/site/cloudflare/worker-entrypoint.ts
Copy link
Copy Markdown
Member

@flakey5 flakey5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Apr 22, 2026

@dario-piotrowicz are the playwright tests stuck?

@dario-piotrowicz
Copy link
Copy Markdown
Member Author

@dario-piotrowicz are the playwright tests stuck?

Yes they were... I've updated the lock file (9b04e0f), where there are no updated related to playwright (just workers-types) and now it's ok... 😅 🤷‍♂️

@dario-piotrowicz dario-piotrowicz added this pull request to the merge queue Apr 22, 2026
Merged via the queue into nodejs:main with commit 524e64b Apr 22, 2026
14 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/DEVX-2481/sentry-to-open-next-worker branch April 22, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants