Skip to content

feat!: vNext - #1415

Merged
timfish merged 21 commits into
masterfrom
feat/vNext
Sep 24, 2026
Merged

timfish merged 21 commits into
masterfrom
feat/vNext

Conversation

@timfish

@timfish timfish commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Updates to v11 of the JavaScript SDKs.

This includes:

  • Changes the minimum supported Electron version to v35
    • Removed code that gated for older Electron versions
  • Additions and removals of exports and @sentry/core/{server,browser} split
  • Making the tests span streaming centric because it's now the default

Comment thread src/common/span-data-backfill.ts Outdated
Comment thread src/main/sdk.ts Outdated
claude added 4 commits August 31, 2026 19:01
Bump all `@sentry/*` packages to `11.0.0-alpha.2` (and `@sentry/conventions`
to `^0.20.0`) and adapt to the breaking changes in that release:

- The `sentry.source` span attribute / `SEMANTIC_ATTRIBUTE_SENTRY_SOURCE`
  export were replaced by `sentry.segment.name.source` /
  `SENTRY_SEGMENT_NAME_SOURCE`. Update the re-export lists and the e2e span
  assertions accordingly.
- Re-export the new `bfcacheIntegration`, `interactionsIntegration` (browser)
  and `workerThreadsIntegration` (node) so `check-exports` passes.

Remove hacks that the SDK now handles itself:

- `NodeClient.init()` now sets up the async-context strategy and wires
  `asyncLocalStorageLookup`, so the manual `setAsyncLocalStorageAsyncContextStrategy()`
  call and lookup assignment are dropped from the main and utility inits.
- The `enableLogs` client option was removed in v11 (logs are on by default,
  gated per-log via `beforeSendLog`), so the log-capture integrations gate on
  their own `captureLogs` option only.
- Drop the direct `@sentry/opentelemetry` dependency; it was added purely for
  the span-data backfill that was already removed, and remains available
  transitively via `@sentry/node`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PbscLoW7dZTXEm8ebixtgS
The browser pageload segment span is now named `Pageload` in
`11.0.0-alpha.2` instead of the document URL (`app:///src/index.html`);
`sentry.segment.name.source` remains `url`. Update the e2e assertion to
match. Verified against Electron 25.9.8.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PbscLoW7dZTXEm8ebixtgS
Drop the verb from the new per-integration log-capture option in the
child process, Electron breadcrumbs, and net breadcrumbs integrations:
`captureLogs` -> `logs`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PbscLoW7dZTXEm8ebixtgS
Resolve conflicts from master's parallel work:
- package.json / renderer/sdk.ts: keep the v11.0.0-alpha.2 SDK versions
  and the matching TypeScript version-hint parameter.
- child-process / electron-breadcrumbs / net-breadcrumbs integrations:
  master added the same log-capture option under the name `logs`; keep
  that naming (matching the earlier `captureLogs` -> `logs` rename) and
  drop the redundant local alias in net-breadcrumbs.
- Carry forward master's CHANGELOG entries and new Electron test versions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PbscLoW7dZTXEm8ebixtgS
claude and others added 13 commits September 1, 2026 13:54
`@sentry/node` v11 requires Node >= 20.19.0. The first Electron release
whose bundled Node satisfies this is Electron 35 (Node 22.14.0); Electron
34 and earlier ship Node <= 20.18.1.

- Raise the runtime guard in `init()` to require Electron >= 35.
- Update the README supported-versions line and add a 7.x -> 8.x
  migration note.
- Start the e2e Electron test matrix at 35 (`versions.json` + the
  `update-electron-versions` script).
- Bump the `electron` devDependency to a supported version (^35.7.5).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PbscLoW7dZTXEm8ebixtgS
Adapt to the export changes in the beta:

- The node stack-trace and watchdog helpers (`nodeStackLineParser`,
  `callFrameToStackFrame`, `watchdogTimer`) moved from the main
  `@sentry/core` entry to `@sentry/core/server`; import them from there.
- `otlpIntegration` was renamed to `openTelemetryIntegration` in
  `@sentry/node`.
- `bfcacheIntegration` was renamed to `bfcacheMetricsIntegration` in
  `@sentry/browser`.
- Cast the transport request `protocol` to the narrowed Electron type.
Resolve the `test/e2e/versions.json` conflict by keeping the Electron 35+
floor (the vNext minimum) while adopting master's newer patch versions
(42.11.2, 43.6.0, 44.2.0).
electron is a build/test-only devDependency and is never shipped to
consumers, so the high-severity Electron advisories flagged against the
floor of our supported range do not affect downstream apps. Add a
.github/dependency-review-config.yml that the org dependency-review
workflow reads, allow-listing those GHSAs while keeping
fail-on-severity: high for everything else.
Bump all @sentry/* packages from 11.0.0-beta.1 to 11.0.0-rc.0 and
@sentry/conventions to ^0.23.0 (required by @sentry/core@rc.0). Update
the renderer version-hint type param, and re-export the new node/browser
symbols surfaced in rc.0 (Mastra/Mistral AI integrations, Flue, the
conversation hook, getInstrumentedModuleNames, browser consoleIntegration)
so check-exports stays green.
With the minimum supported Electron now v35, the version-gated fallbacks
are dead code:
- registerProtocol always uses protocol.handle (>= 25), dropping the
  deprecated registerStringProtocol path and the supportsProtocolHandle
  helper.
- setPreload always uses registerPreloadScript (>= 35), dropping the
  deprecated getPreloads/setPreloads fallback and the now-unnecessary
  Session shim type.
With the minimum supported Electron now v35, the ELECTRON_MAJOR_VERSION
gates are always-true/false:
- stack-parse: remove the '< 34' throw and the ElectronV34Frame cast;
  call webContents.mainFrame.collectJavaScriptCallStack() directly (the
  method is in Electron 35 typings).
- renderer-anr: the '>= 34' checks are always true, so enable the
  DocumentPolicy JS-call-stacks feature and native stack capture
  unconditionally.
- electron-normalize: ELECTRON_MAJOR_VERSION is now unused, so remove it
  along with its parseSemver-based derivation.
Resolve conflicts by keeping the v11.0.0-rc.0 SDK line over master's
v10.75.0 (package.json deps + renderer version-hint), and merge
test/e2e/versions.json by keeping the Electron 35+ floor while adopting
master's newer patch releases (42.11.4, 43.7.1, 44.4.1). yarn.lock
regenerated from the merged package.json.
The master merge's lockfile resolution kept the older nanoid@3.3.16
(high-severity GHSA-2v37-7h3g-55p8, infinite loop when size is zero),
which dependency-review flags as newly introduced relative to master
(now on the patched 3.3.18). Realign yarn.lock with master's dev
toolchain so nanoid resolves to 3.3.18 while keeping the v11.0.0-rc.0
SDK deps. nanoid is a build/test-only transitive dependency.
Resolve the electron-normalize conflict by combining our removal of the
pre-v25 protocol.handle fallback (min Electron is now v35) with master's
#1433 change to return the callback's resolved body as the protocol
response (real sendFeedback result).
Bump all @sentry/* packages from 11.0.0-rc.0 to 11.0.0-rc.1 and update
the renderer version-hint param. Adapt re-exports to rc.1's surface:
drop SENTRY_SEGMENT_NAME_SOURCE (removed upstream from browser/node/core;
streamed-renderer-spans keeps its own local constant) and add the new
node integrations eveInstrumentation, eveIntegration, groqIntegration
and togetherAIIntegration so check-exports stays green.
Bump all @sentry/* packages from 11.0.0-rc.1 to the stable 11.0.0 release
and update the renderer version-hint param. Export surface is unchanged
from rc.1 (check-exports passes).
@timfish
timfish marked this pull request as ready for review September 24, 2026 11:15
@timfish
timfish requested a review from andreiborza September 24, 2026 11:17

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

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 7e280c6. Configure here.

Comment thread src/main/sdk.ts
configureUtilityProcessIPC();

setNodeAsyncContextStrategy();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Init omits async context strategy

High Severity

Main and utility init no longer install an async context strategy before creating the client. getCurrentScope, isolation, and span parenting then fall back to the default global strategy, so concurrent work can leak scope and trace context across events. The unit test still calls setAsyncLocalStorageAsyncContextStrategy and assigns asyncLocalStorageLookup on NodeClient, which production init does not.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7e280c6. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's handled by the Node SDK

import type { StackFrame, StackParser } from '@sentry/core';
import { nodeStackLineParser, stripSentryFramesAndReverse } from '@sentry/core';
import { stripSentryFramesAndReverse } from '@sentry/core';
import { nodeStackLineParser } from '@sentry/core/server';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Renderer imports server-only core entry

Medium Severity

The renderer stack parser now imports nodeStackLineParser from @sentry/core/server. That entry exists to keep server-only code out of browser bundles. In renderers without nodeIntegration, resolving or bundling the server entry can fail or pull Node-only modules into the renderer SDK.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7e280c6. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This has always been the case!

@timfish
timfish merged commit 630c553 into master Sep 24, 2026
116 checks passed
@timfish
timfish deleted the feat/vNext branch September 24, 2026 14:23
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.

3 participants