Skip to content

docs(cloudflare): Document withSentry from @sentry/nextjs/cloudflare - #19874

Open
JPeer264 wants to merge 1 commit into
masterfrom
jp/nextjs-cloudflare-with-sentry
Open

JPeer264 wants to merge 1 commit into
masterfrom
jp/nextjs-cloudflare-with-sentry

Conversation

@JPeer264

@JPeer264 JPeer264 commented Oct 9, 2026

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

This documents withSentry from @sentry/nextjs/cloudflare (getsentry/sentry-javascript#24998, SDK 11.6.0) on the Next.js on Cloudflare page. The page now shows the custom Worker that wraps the OpenNext entry, what sentry.server.config.ts and sentry.edge.config.ts still do in the Worker, and the order the SDK uses to pick the release.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a deadline.

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Oct 9, 2026 9:40am UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Oct 9, 2026 9:40am UTC

Request Review

Add the custom Worker setup with withSentry from @sentry/nextjs/cloudflare
(SDK 11.6.0), what the server and edge config files still do in the Worker,
and the order the SDK uses to pick the release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/nextjs-cloudflare-with-sentry branch from 4296d4e to 1e42ebb Compare October 9, 2026 09:33
@JPeer264 JPeer264 self-assigned this Oct 13, 2026
@JPeer264
JPeer264 marked this pull request as ready for review October 13, 2026 15:23
@codeowner-assignment
codeowner-assignment Bot requested a review from a team October 13, 2026 15:23
@cursor

cursor Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The plan checks that the Next.js on Cloudflare page still loads. It checks that client errors on that page stay rare. An issue escalates when that page stops loading or new client errors appear.

Services: sentry-docs.

Mention @change-monitor in a comment to update the plan.

Plan

What changed

Requests to /platforms/javascript/guides/cloudflare/frameworks/nextjs/ now show how to wrap the OpenNext Worker with withSentry. The page now states what sentry.server.config.ts and sentry.edge.config.ts still do in the Worker. It also states the order the SDK uses to pick the release.

This change is live after sentry-docs deploys. The file lives under product docs. develop-docs does not ship it.

Risk

A broken MDX file fails the static build and blocks the production deploy. After a successful deploy, the new code tabs can throw in the browser on this page. Users who copy a wrong Worker sample can misconfigure Sentry on their Workers. That customer failure is not visible in this site's telemetry. Reach is this page and its markdown export. Sibling Cloudflare pages share the catch-all renderer. They do not share this file.

Intended effect

The new Worker wrap copy is not a Sentry field. Confirm the page still hydrates instead. absent looks like docs.page.load for this path at zero while the parent Cloudflare guide still loads.

Signal Baseline Window Rule Source
docs.page.load where path is /platforms/javascript/guides/cloudflare/frameworks/nextjs/ 2 loads 2026-10-12T15:24:19Z to 2026-10-13T15:24:19Z Hold 2-4 in a matching 24h window. Volume is sparse. Zero in 24h is not absent alone. Sentry metrics, org sentry, project docs
docs.page.load where path is /platforms/javascript/guides/cloudflare/frameworks/nextjs/ 23 loads 2026-10-06T15:24:19Z to 2026-10-13T15:24:19Z Hold 14-23 in a matching 7d window. The 14 end is the 24h count scaled to 7d. Sentry metrics, org sentry, project docs
Pageload and navigation spans for this path 30 spans, p95 4142ms 2026-10-06T15:24:19Z to 2026-10-13T15:24:19Z Hold 20-43 spans. The 14d window had 43 spans. absent if both this span count and docs.page.load stay at zero. Sentry spans, org sentry, project docs. Query: environment:production AND (span.op:pageload OR span.op:navigation) AND (http.url:*platforms/javascript/guides/cloudflare/frameworks/nextjs* OR transaction:*platforms/javascript/guides/cloudflare/frameworks/nextjs*)

Client traces sample at 30% for users. docs.page.load is an unsampled client counter. Prefer that counter for intended_effect.

Regression watch

This diff can break CodeTabs or hydration on this page. It can drop sibling Cloudflare page loads if static render regresses. Site-wide fetch failures from Algolia and kapa are known noise. Do not treat those as this change.

Signal Baseline Window Rule Source
Error events whose url contains cloudflare/frameworks/nextjs 0 events 2026-10-12T15:24:19Z to 2026-10-13T15:24:19Z Hold 0. detected if count rises above 1 in a matching 24h window. Sentry errors, org sentry, project docs. Query: url:*cloudflare/frameworks/nextjs*
Error events whose url contains cloudflare/frameworks/nextjs 1 event in 23 loads, 0-4.3% of loads 2026-10-06T15:24:19Z to 2026-10-13T15:24:19Z Hold 0-4.3% of docs.page.load on this path. The one event was a promise rejection titled Event: Event \Event` (type=error) captured as promise rejection. detected` if count rises above 1 in 24h or the 7d rate rises above 4.3%. Sentry errors, org sentry, project docs
Pageload and navigation p95 on this path 4082-4142ms 2026-09-29T15:24:19Z to 2026-10-13T15:24:19Z and 2026-10-06T15:24:19Z to 2026-10-13T15:24:19Z Hold 4082-4142ms when the span count is comparable. A 24h window can return zero spans. Sentry spans, same query as Intended effect
docs.page.load where path is /platforms/javascript/guides/cloudflare/ 136 loads 2026-10-06T15:24:19Z to 2026-10-13T15:24:19Z Hold. detected if this 7d count falls below 68. This is the sibling parent guide. Sentry metrics, org sentry, project docs
docs.page.load where path is /platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/ 25 loads 2026-10-06T15:24:19Z to 2026-10-13T15:24:19Z Hold. detected if this 7d count falls below 12 while other docs pages still load. Sibling framework page. Sentry metrics, org sentry, project docs

If error events rise on this path, inspect the stack for CodeTabs or hydration. Ignore insights.algolia.io and proxy.kapa.ai fetch failures unless they are new on this path only.

Not observable

Whether the new withSentry copy is in the HTML. Whether the Worker wrap steps are correct. 404s for this slug. docs.page.not_found only stores two path segments, so it cannot isolate this page. Pageload spans in a 24h window. That query returned zero spans before deploy because volume is sparse.

Get Slack DMs about this change: cursor.com/automations/rollouts

@coolguyzone coolguyzone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks for updating!

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — 1e42ebb6 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants