Skip to content

docs(cloudflare): Rework the guide for v11 - #19331

Open
JPeer264 wants to merge 2 commits into
js-v11-docsfrom
janpeer/sdk-1426-cloudflare-getting-started-manual-setup
Open

JPeer264 wants to merge 2 commits into
js-v11-docsfrom
janpeer/sdk-1426-cloudflare-getting-started-manual-setup

Conversation

@JPeer264

@JPeer264 JPeer264 commented Sep 10, 2026

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

closes SDK-1426

Updates the Cloudflare guide for the APIs v11 removes or changes. Hold until
v11 ships; every claim here is wrong on the v10 line.

  • Remove the @sentry/cloudflare/nodejs_compat entrypoint, which no longer
    exists, from the guide, the Prisma page, the integrations table and the
    Vercel AI page, and delete its feature page
  • Drop the _experimental Vite plugin options for buildTimeInstrumentation
    and autoInstrumentation, both on by default, and remove the experimental
    alert on the plugin page
  • Import wrapRequestHandler from @sentry/cloudflare/request, the only
    entry that still exports it
  • Delete the removed honoIntegration page
  • Describe spans as streamed by default on the MCP pages and in
    troubleshooting, and keep the v10 opt-in as a separate case
  • Drop the caveat that configured classes must be declared in the Worker
    entry, fixed by fix(cloudflare): Auto-instrument classes re-exported from the worker entry sentry-javascript#23282

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: 2026-09-16
  • 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

@JPeer264 JPeer264 self-assigned this Sep 10, 2026
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
develop-docs Ready Ready Preview Sep 11, 2026 9:07am UTC
sentry-docs Ready Ready Preview Sep 11, 2026 9:07am UTC

Request Review

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

SDK-1426

@github-actions github-actions Bot added the Priority: Deadline Docs review has a specific non-urgent due date label Sep 10, 2026
@JPeer264
JPeer264 force-pushed the janpeer/sdk-1426-cloudflare-getting-started-manual-setup branch from d9c523d to 1f470d1 Compare September 11, 2026 08:45
@JPeer264
JPeer264 changed the base branch from master to janpeer/sdk-1426-cloudflare-getting-started-manual-setup-v10 September 11, 2026 08:46
@JPeer264
JPeer264 added this pull request to stack #19363 September 11, 2026 08:46
@JPeer264
JPeer264 force-pushed the janpeer/sdk-1426-cloudflare-getting-started-manual-setup-v10 branch from 416a998 to 2bd9dce Compare September 11, 2026 08:50
@JPeer264
JPeer264 force-pushed the janpeer/sdk-1426-cloudflare-getting-started-manual-setup branch from 1f470d1 to 280d199 Compare September 11, 2026 08:50
JPeer264 and others added 2 commits September 11, 2026 10:56
Fixes what a new user hits between install and the first event, from the
runtime docs audit (SDK-1426), and reorganizes the guide so the recommended
Vite path leads.

- Add the missing SDK import to the tracing verify snippets, which threw
  `ReferenceError: Sentry is not defined` when copied verbatim
- Lead the quick start with the Vite plugin and an `instrument.server.ts`
  file, turning on the experimental `autoInstrumentation` and
  `useDiagnosticsChannelInjection` options
- Add an Installation Methods section holding the Vite Plugin page, moved out
  of Features, and a new Wrangler page for the `withSentry` setup
- Move the Cloudflare Pages setup to its own page, with a note recommending
  Workers with static assets
- Move release detection and post-response spans to troubleshooting
- Give the Hono framework page the real install and `app.use(sentry())` steps
  instead of a bare redirect
- List the packages the plugin instruments at build time
- Render `compatibility_date` from the build date with Cloudflare's
  "Set this to today's date" comment, instead of pinning the SDK minimum

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Updates the Cloudflare guide for the APIs v11 removes or changes. Hold until
v11 ships; every claim here is wrong on the v10 line.

- Remove the `@sentry/cloudflare/nodejs_compat` entrypoint, which no longer
  exists, from the guide, the Prisma page, the integrations table and the
  Vercel AI page, and delete its feature page
- Drop the `_experimental` Vite plugin options for `buildTimeInstrumentation`
  and `autoInstrumentation`, both on by default, and remove the experimental
  alert on the plugin page
- Import `wrapRequestHandler` from `@sentry/cloudflare/request`, the only
  entry that still exports it
- Delete the removed `honoIntegration` page
- Describe spans as streamed by default on the MCP pages and in
  troubleshooting, and keep the v10 opt-in as a separate case
- Drop the caveat that configured classes must be declared in the Worker
  entry, fixed by getsentry/sentry-javascript#23282

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the janpeer/sdk-1426-cloudflare-getting-started-manual-setup branch from 280d199 to 139d9c2 Compare September 11, 2026 09:00
@JPeer264
JPeer264 force-pushed the janpeer/sdk-1426-cloudflare-getting-started-manual-setup-v10 branch from 2bd9dce to 5e124f9 Compare September 11, 2026 09:01
Base automatically changed from janpeer/sdk-1426-cloudflare-getting-started-manual-setup-v10 to master September 15, 2026 07:22
@andreiborza
andreiborza removed this pull request from stack #19363 September 22, 2026 12:15
@andreiborza
andreiborza changed the base branch from master to js-v11-docs September 22, 2026 12:15
@andreiborza
andreiborza marked this pull request as ready for review September 22, 2026 13:17
@codeowner-assignment
codeowner-assignment Bot requested a review from a team September 22, 2026 13:17
Comment on lines +87 to +97
export const handle = ({ event, resolve }) => {
const requestHandlerOptions = {
options: {
dsn: event.platform.env.SENTRY_DSN,
tracesSampleRate: 1.0,
},
request: event.request,
context: event.platform.ctx,
};
return wrapRequestHandler(requestHandlerOptions, () => resolve(event));
};

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.

Bug: The code example in pages.mdx under "Don't have access to onRequest?" is SvelteKit-specific and will cause runtime errors for generic Cloudflare Pages users.
Severity: HIGH

Suggested Fix

Remove the SvelteKit-specific example from the generic Cloudflare Pages guide. Alternatively, clearly label this section as applicable only to SvelteKit users and provide a link to the relevant SvelteKit documentation. The current presentation is misleading and provides non-functional code for the guide's target audience.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: docs/platforms/javascript/guides/cloudflare/features/pages.mdx#L83-L97

Potential issue: The documentation file `pages.mdx` includes a code example under the
"Don't have access to onRequest?" section that is specific to SvelteKit. It uses
patterns like a `handle` function and accesses `event.platform.env`, which are not
available in a standard Cloudflare Pages environment. This example is presented in the
generic Cloudflare Pages guide without any mention of its SvelteKit dependency. A user
following this guide for a non-SvelteKit project will copy code that fails at runtime
with a `TypeError` because the `event` object will be undefined.

Did we get this right? 👍 / 👎 to inform future reviews.

This branch was successfully deployed

2 active deployments
Preview – sentry-docs 139d9c20 Deployed Sep 11, 2026 by vercel[bot]
Preview – develop-docs 139d9c20 Deployed Sep 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

js-v11-docs Priority: Deadline Docs review has a specific non-urgent due date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant