Skip to content

feat(onboarding): Prepare JavaScript SDK v11 onboarding - #125193

Merged
andreiborza merged 21 commits into
masterfrom
js-v11-onboarding
Sep 23, 2026
Merged

andreiborza merged 21 commits into
masterfrom
js-v11-onboarding

Conversation

@andreiborza

Copy link
Copy Markdown
Member

Collects the JavaScript SDK v11 onboarding changes merged into js-v11-onboarding for release to master. The individual onboarding PRs target this branch so the updates can ship together.

Keep this PR in draft with the Do Not Merge label until the JavaScript SDK v11 release is ready.

Related documentation release PR: getsentry/sentry-docs#19557

@andreiborza andreiborza added Do Not Merge Don't merge js-v11-onboarding In-product onboarding updates for the JavaScript SDK v11 (SDK-1349) labels Sep 22, 2026
SDK v11 removes the browser AI instrumentation helpers. Browser-only
projects now use the existing unsupported-platform views in Agent
Monitoring and Conversations, with a link to the browser
manual-instrumentation guide and copyable setup instructions. Their
unused onboarding steps, registrations, and tests are removed.
Meta-frameworks and Bun use the shared Node onboarding directly. When
browser and supported server projects are selected together, onboarding
prefers a supported project.

Plain JavaScript profiling examples explicitly use `profileLifecycle:
"trace"` and enable tracing when profiling is selected alone. The docs
also correct the `tracesSampler` reference and specify that the logs
instructions without `enableLogs: true` require SDK version 10.71.0 or
later.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 22, 2026
closes SDK-1445

Replace the bare verification error with a Vue component that sends an
error and selected logs and metrics when its button is clicked.

Fix root component imports, remove the unused Vue 3 router import, and
use traces terminology. Add regression coverage for both Vue versions
and the selected signals.

I changed the `Verify` example, as only the function looked a little
boring and is a little different to other examples (e.g. Svelte). The
new test error will look like this:
https://sentry-sdks.sentry.io/issues/7721323875/

Co-authored-by: Cursor <cursoragent@cursor.com>
JPeer264 and others added 2 commits September 22, 2026 15:19
closes SDK-1432

Raise the minimum supported Astro version to 4, matching the SDK v11
migration guide. Strengthen regression coverage to keep build-time
options separate from client and server runtime configuration.

Nothing else was in the onboarding guide.

Co-authored-by: Cursor <cursoragent@cursor.com>
closes SDK-1449

Workers and Pages share one onboarding now, but both platforms were
still offered when creating a project, under two entries that read the
same.

Add a hidden flag to PlatformIntegration for a platform that stays valid
for existing projects but is no longer offered when creating one, and
set it on `node-cloudflare-pages`. Unlike deprecated, it does not stop
the docs from loading, so projects on the old key keep their onboarding.
The SCM dropdown and the picker categories both drop it; project
settings still lists it when it is the project's current platform, so
the field shows a value.

Both keys are named "Cloudflare (Node)", following the convention the
other multi-language products use, such as AWS Lambda (Node), since
Cloudflare Workers also runs Python, but we don't offer it yet.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Nothing more than changing the version range. Remix v3 is not yet
supported as of
getsentry/sentry-javascript#23901 and the rest
of the onboarding is wizard driven.

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

Comment thread static/app/gettingStartedDocs/node-cloudflare-workers/utils.tsx
Comment thread static/app/gettingStartedDocs/node-cloudflare-workers/logs.tsx Outdated
Comment thread static/app/data/platforms.tsx
Comment thread static/app/gettingStartedDocs/node-cloudflare-workers/onboarding.tsx Outdated
JPeer264 and others added 2 commits September 22, 2026 16:15
closes SDK-1446

The Node onboarding still described a v10 setup: the entry point snippet
was mislabelled as `instrument.(js|mjs)`, the text carried an Express
error handler note that does not belong in the generic Node guide, and
ESM was left to a docs link.

The configure step is now ESM only, in the shape the Express guide uses.
`instrument.mjs` holds the `Sentry.init()` call, the app starts with
`node --import ./instrument.mjs index.mjs`, and `index.mjs` is shown as
the entry point.

Widen `getSdkInitSnippet()` to take `esm-only`, so the snippet drops the
CommonJS hint comment that an ESM only guide does not need.

Pull the verify snippet into `getVerifySnippet()` so the tracing and the
plain branch share one set of log and metric lines, and add a tracing
next step when tracing is selected.

This is the same as #123779
closes SDK-1459

The Bun onboarding still described the v10 SDK: a single `Sentry.init()`
call in an unnamed file, no `dataCollection` options, and no logs,
metrics or MCP guides.

The configure step now splits the setup into an `instrument.ts` file and
a `bun --preload` command that runs it before every other module, which
is what the `Bun.serve` and `node:http` instrumentation needs. When
tracing is selected, it documents `sentryBunPlugin()`, because libraries
such as `mysql` and `postgres` are instrumented at build time on Bun.

Add logs, metrics and MCP onboarding. They share one install block and
one `Sentry.init()` snippet from `utils.tsx`, so the snippets cannot
drift apart. The install block uses `bun add` instead of the
npm/yarn/pnpm tabs of the Node helpers. The metrics guide also documents
`bunRuntimeMetricsIntegration` for CPU, memory and event loop metrics.

---------

Co-authored-by: isaacs <i@izs.me>
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.57% 95.57% ±0%
Typed 140,424 140,472 🟢 +48
Untyped 6,516 6,516 ±0
🔍 1 new type safety issue introduced

any-typed symbols (1 new)

File Line Detail
static/app/gettingStartedDocs/deno/onboarding.tsx 151 steps (var)

This is informational only and does not block the PR.

andreiborza and others added 7 commits September 23, 2026 06:52
## What

Switches the Express onboarding to ESM with a `node --import
./instrument.js` start command, and removes the
`Sentry.setupExpressErrorHandler(app)` call together with the
`res.sentry` fallthrough handler.

## Why

v11 no longer supports `--require`, and `expressIntegration()` now
captures route handler errors automatically.
…3852)

## What

Moves the SolidStart server instrument file from
`public/instrument.server.mjs` to `src/instrument.server.ts`, adds the
missing `withSentry` wrapper in `app.config.ts`, and points the
`--import` flag at the build output.

## Why

The old placement served the instrument file to the internet, which the
guide had to warn about. Wrapping the config with `withSentry` lets the
build emit the file into `.output/server/` instead, matching our docs
and e2e apps.
## What

Switches the Hapi onboarding to ESM with a `node --import
./instrument.js` start command, and removes the
`Sentry.setupHapiErrorHandler(server)` call.

## Why

v11 no longer supports `--require`, and the Hapi error handler is
registered automatically when the server starts.
## What

Switches the Koa onboarding to ESM with a `node --import
./instrument.js` start command, and removes the
`Sentry.setupKoaErrorHandler(app)` call.

## Why

v11 no longer supports `--require`, and the Koa error handler is
registered automatically when the app starts.
## What

Switches the Fastify onboarding to ESM with a `node --import
./instrument.js` start command, and removes the
`Sentry.setupFastifyErrorHandler(app)` call.

## Why

v11 no longer supports `--require`, and `fastifyIntegration` now
captures route handler errors on its own.
Update the in-product Next.js onboarding for @sentry/nextjs v11.

- State that the SDK requires Next.js 14 or later in the install step.
- Import `withSentryConfig` from `@sentry/nextjs/config` in the
profiling `next.config` snippet, and label the ESM tab
`next.config.mjs`. The root export is removed in v11. The `./config`
entry point already exists in 10.x, so the snippet also works for users
who have not upgraded yet.
- Drop the paragraph about SDK versions 7.57.x and below needing tracing
enabled for distributed tracing.
- Remove `browserTracingIntegration` from the distributed tracing
snippet, since the Next.js SDK adds it by default.
- Fix "React project" to "Next.js project" and "NextJS" to "Next.js" in
the performance onboarding, and use a consistent `(js|ts)` suffix for
the three config file names.

Checked and unchanged: `reactComponentAnnotation`,
`enableOpenTelemetrySetup` and `sendDefaultPii` do not appear in this
onboarding, the agent monitoring step already targets
`sentry.server.config` only, and all docs links resolve.

closes
[SDK-1435](https://linear.app/getsentry/issue/SDK-1435/update-the-javascript-nextjs-in-product-onboarding-for-v11)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
closes SDK-1460

The Deno onboarding still described the v10 SDK: a single
`Sentry.init()` call with no tracing, no separate instrument file, and
no logs or metrics. v11 makes Deno a full server SDK, so the guide now
matches the other server platforms.

The configure step splits the setup into an `instrument.ts` file and a
`main.ts` entry point that imports it first, which is what the
OpenTelemetry tracer needs. When tracing is selected, it also documents
the `--import` flag that turns on the channel-based instrumentations for
libraries such as `mysql` and `postgres`.

Add logs, metrics and MCP onboarding, which v11 exports on Deno. They
share one install block and one `Sentry.init()` snippet from
`utils.tsx`, so the snippets cannot drift apart. The install block uses
`deno add` and the `npm:` specifier instead of the npm/yarn/pnpm tabs of
the Node helpers.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 5 total unresolved issues (including 3 from previous reviews).

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 40c4933. Configure here.

Comment thread static/app/gettingStartedDocs/node-cloudflare-pages/index.tsx
Comment thread static/app/gettingStartedDocs/javascript-solidstart/index.tsx
The Logs page passes no setup type, so the logs onboarding always showed
the manual withSentry snippet, which conflicts with the default Vite
plugin setup. Show the Vite, Manual and Pages snippets as tabs when no
setup type is set, and only the matching snippet when one is.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ppet (#125300)

The merged Cloudflare onboarding dropped the functions/customerror.js
file name and the /customerror path from the Pages verify step, so users
could not tell how to trigger the test error. Add both back to the text,
and show the file name in the snippet header.

The content block type allows a filename on a single code block, but the
renderer only passed it to tabbed snippets, so single snippets never
showed their file name. Pass it through for single snippets as well.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…latforms (#123733)

Init snippets carried a commented-out `dataCollection` block. Commented
code is easy to skim past, so the spec asks for a real step instead
(getsentry/sentry-javascript#23694).

This drops those blocks across JS platforms and adds a "Control the Data
You Send to Sentry (Optional)" step, linking each guide's
`#dataCollection` options.

Agent monitoring gets a variant that leads with genAI inputs and
outputs. It cannot be collapsible there, since those flows filter
collapsible steps out. Eve gets none, since it never calls
`Sentry.init`. The AI snippets also drop `dataCollection: {}`, unneeded
in v11.

Closes getsentry/sentry-javascript#23698

## AI Agent Setup
<img width="676" height="366" alt="image"
src="https://github.com/user-attachments/assets/cd4037e6-7db0-45ce-9d58-e56a93d4e01a"
/>

<img width="685" height="560" alt="image"
src="https://github.com/user-attachments/assets/8dd6ae06-6296-4fe2-8e75-a4d644560da6"
/>

---
In Onboarding

<img width="1422" height="356" alt="image"
src="https://github.com/user-attachments/assets/cf4d6502-ce01-44ee-884f-12538a0534ea"
/>

---------

Co-authored-by: Jan Peer Stöcklmair <jan.peer@sentry.io>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-kbt3o9k94.sentry.dev

@andreiborza
andreiborza marked this pull request as ready for review September 23, 2026 12:29
@andreiborza
andreiborza requested review from a team as code owners September 23, 2026 12:29
@andreiborza
andreiborza merged commit 74a9c9b into master Sep 23, 2026
80 checks passed
@andreiborza
andreiborza deleted the js-v11-onboarding branch September 23, 2026 12:45
JPeer264 added a commit that referenced this pull request Sep 23, 2026
(DO NOT MERGE into `js-v11-onboarding`, as this backend change should be
merged separately based on the guidelines)

(1:1 the same as #123770 and #123768 **but with the backend changes
only**. Got removed because of
[this](#125193 (comment)))

Drop the Pages rule, which also drops the supersession, so both kinds of
repo resolve to `node-cloudflare-workers`. The remaining rule now
matches `wrangler.json` and `wrangler.jsonc` as well, since a Workers
project has used those since wrangler 3.91.

No platform key is added or removed, so existing projects are unaffected
and this can deploy in either order relative to the frontend change.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview c7a9ce20 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Merge Don't merge js-v11-onboarding In-product onboarding updates for the JavaScript SDK v11 (SDK-1349) Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants