chore(open-next): add server-side sentry to open-next site#8830
chore(open-next): add server-side sentry to open-next site#8830dario-piotrowicz wants to merge 5 commits intonodejs:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Updates Reviewed by Cursor Bugbot for commit 3d76a43. 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 @nodejs/web-infra 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 #8830 +/- ##
=======================================
Coverage 73.88% 73.88%
=======================================
Files 105 105
Lines 8889 8889
Branches 326 326
=======================================
Hits 6568 6568
Misses 2320 2320
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dario Piotrowicz <dario.piotrowicz@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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.
ovflowd
left a comment
There was a problem hiding this comment.
Why are we doing this? Where the need of adding Sentry comes from?
|
@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
|
|
If that's not the case, I'd recommend you to review your Copilot settings, IDK 😅 |
|
no, I didn't... 😕 😓 🤷 |
| dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0', | ||
| // Adds request headers and IP for users, for more info visit: | ||
| // https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#sendDefaultPii | ||
| sendDefaultPii: true, |
There was a problem hiding this comment.
Why do we need to disable this? This is pretty important for allowing Sentry to properly tell us the scope of an issue in terms of user impact etc.
There was a problem hiding this comment.
mh... shall we disable it just to get sentry integrated and possibly re-enable it later when/if we want? 🤔
There was a problem hiding this comment.
@dario-piotrowicz we had Sentry in the past with good chunk of customization, could you please go through GitHub history and check it out (just to compare what we had at the time)
There was a problem hiding this comment.
We should replicate the settings that we use on the release worker, as we know those settings work for us. I don't think historical settings from the Next.js site make much sense as a reference point, given this is Worker instrumentation.
There was a problem hiding this comment.
I don't see settings set for the release worker: https://github.com/nodejs/release-cloudflare-worker/blob/main/src/worker.ts 👀 am I looking in the wrong place? or do you mean those Sentry.setTags?
| tracesSampleRate: 1.0, | ||
| }), | ||
| { | ||
| async fetch( |
There was a problem hiding this comment.
What is this fetch override, ooc? 👀
There was a problem hiding this comment.
This fetch calls the actual open-next worker
| */ | ||
| SENTRY_DSN?: string; | ||
| }) => ({ | ||
| dsn: env.SENTRY_DSN, |
There was a problem hiding this comment.
Will this also need a SENTRY_DSN secret be added to the repo +
nodejs.org/.github/workflows/tmp-cloudflare-open-next-deploy.yml
Lines 63 to 69 in 333d70f
There was a problem hiding this comment.
I needs to set it in the Cloudflare dashboard, I've done that 🙂




Description
This PR adds server-side sentry to the open-next site.
Validation
To be done.
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.