[DO NOT MERGE] chore(deps): Probe @sentry/* v11.0.0-beta.2 compatibility - #6688
[DO NOT MERGE] chore(deps): Probe @sentry/* v11.0.0-beta.2 compatibility#6688antonis wants to merge 14 commits into
Conversation
Spike to surface JS v11 compatibility issues via CI. Bumps first-party @sentry/* dependencies (browser, core, react, bundler-plugins, eslint-plugin-sdk, typescript) to 11.0.0-alpha.2 across core and the sample/e2e apps, and adapts the SDK source to the v11 breaking changes: - spanToJSON() now returns the streamed shape; switched the internals that need the classic SpanJSON to spanToStaticSpanJSON(). - inboundFiltersIntegration -> eventFiltersIntegration (re-exported under the RN public name). - AI instrumentation (OpenAI/Anthropic/GenAI/LangChain/LangGraph) moved to server-only @sentry/server-utils; dropped those re-exports. - SEMANTIC_ATTRIBUTE_SENTRY_SOURCE -> SENTRY_SEGMENT_NAME_SOURCE alias. - ExtendedError / User index signatures tightened to unknown; narrowed the affected call sites. - enableLogs and sendDefaultPii are now RN-owned options (core removed them / RN Omits dataCollection); cast getOptions() accordingly. - Test harness migrated off the removed Scope.clear() via a clearAllScopes() helper in test/testutils.ts. Local: yarn build compiles clean. Known remaining test failures are tracked as follow-ups (old span shape in assertions, obsolete AI export test, measurements investigation). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove orphaned getCurrentScope/getGlobalScope/getIsolationScope imports left by the Scope.clear() -> clearAllScopes() test migration (10 files). - Regenerate the API report to reflect the removed AI instrumentation re-exports and the inboundFilters -> eventFilters rename. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Format the 16 source/test files touched by the v11 migration. The earlier Lint run never reached the oxfmt step because oxlint failed first on the orphaned scope imports; with those fixed, oxfmt --check surfaced the drift. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bumps the JS SDK spike from 11.0.0-alpha.2 to 11.0.0-beta.0 across core, samples and e2e-tests. beta.0 splits the `@sentry/core` main entry into shared/browser/server subpaths, removing `startIdleSpan` and `XhrBreadcrumbHint` from the root export. Import both from the `@sentry/core/browser` subpath (the root-level shim stubs keep classic `moduleResolution: node` resolution working): - tracing/span.ts: `startIdleSpan` -> `@sentry/core/browser` - replay/xhrUtils.ts: `XhrBreadcrumbHint` type -> `@sentry/core/browser` Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Production fixes: - clearActiveSpanFromScope: v11 stores the active span in a WeakRef under scope.refs.span, not the removed scope._sentrySpan property. Deleting the old field was a no-op, leaving the previous navigation/interaction span active so it became the parent of the next root span. Clear via the official _INTERNAL_setSpanForScope helper instead. - sdk.tsx: pin traceLifecycle: 'static' so mobile keeps the classic transaction-envelope behavior instead of v11's new streaming default. Test updates for v11 behavior changes: - spanToJSON -> spanToStaticSpanJSON where the classic span shape is asserted. - startIdleSpan now imported from @sentry/core/browser (entry-point split). - Scope.clear() removed -> resetScope helper mirrors the old reset. - Non-canonical status messages normalize to 'internal_error'. - Child spans no longer carry a default sentry.source: 'custom'. - app.start snapshot: sentry.segment.name.source key and status 'ok'. - Drop obsolete enableMetrics suppression test and aiExports test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sentry/core v11.0.0-beta.0 drops its down-levelled TS 3.8 types (no `build/types-ts3.8`, `typesVersions` removed), raising the floor to TypeScript 5.0.4. The old "Type Check Typescript 3.8" guard failed with parse errors it can't skip (skipLibCheck only skips type-checking, not parsing) when TS 3.8 hits v11's modern `.d.ts` syntax. Retarget the guard to TypeScript 5.0.4 (the new minimum): rename the ts3.8-test project to ts5.0-test and bump its TypeScript devDependency. Verified locally that @sentry/react-native -> @sentry/core@11.0.0-beta.0 type-checks cleanly under 5.0.4. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…me.source JS v11 removed the `sentry.source` semantic attribute; the transaction name source now lives under `sentry.segment.name.source` on the segment span. The navigation transaction's serialized `contexts.trace.data` therefore carries the new key (matching the app-start unit snapshot already updated in this branch). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…mpat # Conflicts: # dev-packages/e2e-tests/package.json # samples/expo/package.json # samples/react-native-macos/package.json # samples/react-native/package.json # yarn.lock
… v11 JS v11's `spanToJSON` returns the streamed span shape, which no longer carries the classic `.data` attribute bag. The TurboModule Playground screen read `spanToJSON(span).data`, so under v11 it collected no `turbo_module.*` attributes and rendered nothing — failing the `turboModuleSpanAttributes` e2e flow on both iOS and Android at the on-screen `scrollUntilVisible` step. Switch to `spanToStaticSpanJSON`, the classic-shape helper the SDK already uses internally. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Compatibility validation of the @sentry/* JavaScript SDK v11.0.0-beta.1 against the React Native SDK. Bumps @sentry/* from 11.0.0-beta.0 to 11.0.0-beta.1 across packages/core, the samples and dev-packages/e2e-tests. No new source adaptations were required on top of the beta.0 work: build, the full test suite (1927 SDK + 340 tools), circular-dep check, API report, lint and the TS 5.0 type-compat guard all pass unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Compatibility spike for the JS SDK v11.0.0-beta.2 pre-release. Bumps @sentry/* from 11.0.0-beta.1 across packages/core, the samples and dev-packages/e2e-tests. beta.2 required no new source adaptations; the one RN-relevant breaking change (attributes required in the sampling context) does not affect RN, which forwards sampling-context args unchanged in safeTracesSampler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
📲 Install BuildsAndroid
|
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0a9e622+dirty | 3835.87 ms | 1221.07 ms | -2614.80 ms |
| 7d6fd3a+dirty | 1223.29 ms | 1229.57 ms | 6.28 ms |
| 5ca03f9+dirty | 3844.55 ms | 1218.36 ms | -2626.19 ms |
| 774257e+dirty | 3846.90 ms | 1215.02 ms | -2631.88 ms |
| 40c9884+dirty | 3837.72 ms | 1226.61 ms | -2611.11 ms |
| 4e0b819+dirty | 3839.05 ms | 1210.75 ms | -2628.30 ms |
| d038a14+dirty | 3845.71 ms | 1228.11 ms | -2617.59 ms |
| 57e0069+dirty | 3842.29 ms | 1212.12 ms | -2630.17 ms |
| 882f8ae+dirty | 3840.30 ms | 1224.41 ms | -2615.88 ms |
| 5125c43+dirty | 3846.45 ms | 1221.12 ms | -2625.32 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0a9e622+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 7d6fd3a+dirty | 3.38 MiB | 4.77 MiB | 1.39 MiB |
| 5ca03f9+dirty | 4.98 MiB | 6.53 MiB | 1.55 MiB |
| 774257e+dirty | 5.15 MiB | 6.70 MiB | 1.54 MiB |
| 40c9884+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 4e0b819+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| d038a14+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
| 57e0069+dirty | 4.98 MiB | 6.50 MiB | 1.52 MiB |
| 882f8ae+dirty | 5.15 MiB | 6.70 MiB | 1.54 MiB |
| 5125c43+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| "@types/react": "17.0.83", | ||
| "@types/react-native": "0.65.30", | ||
| "typescript": "3.8.3" | ||
| "typescript": "5.0.4" |
There was a problem hiding this comment.
TS 3.8 downlevel types no longer type-checked
Bumping this suite to TypeScript 5.0.4 means CI only validates modern dist types, while @sentry/react-native still ships ts3.8 via typesVersions (<4.9) with no remaining consumer that exercises those downlevel declarations.
Evidence
- This hunk sets
typescriptfrom3.8.3to5.0.4and renames the package tosentry-react-native-ts-5-0-test. run-type-check.shonlycds intots5.0-testand runsyarn type-checkthere.packages/core/package.jsonstill definestypesVersions["<4.9"] -> ts3.8/*and thedownlevelscript still emitsts3.8/dist.- TypeScript 5.0 is not
<4.9, so this job resolvesdisttypes and never loads the shippedts3.8declarations.
Identified by Warden · code-review · A8Z-SC9
| @@ -24,10 +20,8 @@ import { captureFeedback } from '@sentry/core'; | |||
| import { captureMessage } from '@sentry/core'; | |||
| import { Client } from '@sentry/core'; | |||
| import type { ClientOptions } from '@sentry/core'; | |||
| import { CompiledGraph } from '@sentry/core'; | |||
| import { consoleLoggingIntegration } from '@sentry/browser'; | |||
| import { consoleSandbox } from '@sentry/core'; | |||
| import { createLangChainCallbackHandler } from '@sentry/core'; | |||
| import { createReduxEnhancer } from '@sentry/react'; | |||
| import { dedupeIntegration } from '@sentry/react'; | |||
| import type { Envelope } from '@sentry/core'; | |||
| @@ -47,33 +41,17 @@ import { getCurrentScope } from '@sentry/core'; | |||
| import { getGlobalScope } from '@sentry/core'; | |||
| import { getIsolationScope } from '@sentry/core'; | |||
| import { getRootSpan } from '@sentry/core'; | |||
| import { GoogleGenAIChat } from '@sentry/core'; | |||
| import { GoogleGenAIClient } from '@sentry/core'; | |||
| import { GoogleGenAIOptions } from '@sentry/core'; | |||
| import type { HostComponent } from 'react-native'; | |||
| import { httpClientIntegration } from '@sentry/react'; | |||
| import { httpContextIntegration } from '@sentry/react'; | |||
| import type { ImageStyle } from 'react-native'; | |||
| import { inboundFiltersIntegration } from '@sentry/react'; | |||
| import { instrumentAnthropicAiClient } from '@sentry/core'; | |||
| import { InstrumentedMethod } from '@sentry/core'; | |||
| import { instrumentGoogleGenAIClient } from '@sentry/core'; | |||
| import { instrumentLangGraph } from '@sentry/core'; | |||
| import { instrumentOpenAiClient } from '@sentry/core'; | |||
| import { instrumentStateGraph } from '@sentry/core'; | |||
| import { instrumentStateGraphCompile } from '@sentry/core'; | |||
| import { eventFiltersIntegration as inboundFiltersIntegration } from '@sentry/react'; | |||
| import { Integration } from '@sentry/core'; | |||
| import { LangChainIntegration } from '@sentry/core'; | |||
| import { LangChainOptions } from '@sentry/core'; | |||
| import { LangGraphIntegration } from '@sentry/core'; | |||
| import { LangGraphOptions } from '@sentry/core'; | |||
| import { lastEventId } from '@sentry/core'; | |||
| import { logger } from '@sentry/browser'; | |||
| import type { makeFetchTransport } from '@sentry/browser'; | |||
| import { Metric } from '@sentry/core'; | |||
| import { metrics } from '@sentry/browser'; | |||
| import { OpenAiClient } from '@sentry/core'; | |||
| import { OpenAiOptions } from '@sentry/core'; | |||
| import type { Options } from '@sentry/core'; | |||
| import { Profiler } from '@sentry/react'; | |||
| import * as React_2 from 'react'; | |||
There was a problem hiding this comment.
Previously public AI instrumentation exports are removed without a React Native migration path
The v11 compatibility change removes the previously public AI helpers and types from @sentry/react-native, breaking React Native consumers that import them. The source note only says they moved to server-only @sentry/server-utils, which this package does not depend on and which is not a React Native migration path. Before adopting v11, add user-facing migration documentation or retain a compatible/deprecated shim if these helpers remain supported for React Native users.
Evidence
packages/core/src/js/index.tsno longer re-exports the OpenAI, Anthropic, Google GenAI, LangChain, or LangGraph helpers and types.- The only explanation is an internal note stating that the symbols moved to server-only
@sentry/server-utils, whilepackages/core/package.jsonhas no dependency on that package. - The changelog previously documented these helpers as public React Native exports, so existing consumers can encounter compile-time or runtime import failures after the v11 upgrade.
- Repository search finds no compatibility re-exports or user-facing migration guidance for the removed symbols.
Also found at 1 additional location
packages/core/etc/sentry-react-native.api.md:490-495
Identified by Warden · code-review · ZPV-RBD
| globalHandlersIntegration as browserGlobalHandlersIntegration, | ||
| httpClientIntegration, | ||
| httpContextIntegration, | ||
| inboundFiltersIntegration, | ||
| // `inboundFiltersIntegration` was renamed to `eventFiltersIntegration` in JS v11. | ||
| // Keep the existing public name to avoid breaking the SDK's own API surface. | ||
| eventFiltersIntegration as inboundFiltersIntegration, | ||
| linkedErrorsIntegration as browserLinkedErrorsIntegration, | ||
| rewriteFramesIntegration, | ||
| extraErrorDataIntegration, |
There was a problem hiding this comment.
Aliased inbound filter factory no longer preserves the integration name
The React Native export aliases eventFiltersIntegration to inboundFiltersIntegration, preserving the factory symbol but not the returned integration's name. Existing applications that remove the default integration with an integrations callback such as integration.name !== 'InboundFilters' will no longer remove it after upgrading; the callback must migrate to EventFilters. Document this behavioral rename or provide a compatibility strategy.
Evidence
exports.tsre-exportseventFiltersIntegrationasinboundFiltersIntegration, preserving only the public factory name.getDefaultIntegrations()invokes that alias, while the SDK test confirms the installed integration is namedEventFilters.sdk.tsxpasses the default integrations throughgetIntegrationsToSetup, where user integration customization can filter defaults byintegration.name.- The repository uses this name-based filtering pattern for defaults such as
Dedupe, and no local mapping preserves the formerInboundFiltersname.
Identified by Warden · code-review · D3A-GCF
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 37a2091+dirty | 429.71 ms | 477.00 ms | 47.29 ms |
| af33f3b+dirty | 417.68 ms | 448.04 ms | 30.37 ms |
| c2e182c+dirty | 468.50 ms | 545.44 ms | 76.94 ms |
| a50b33d+dirty | 353.21 ms | 398.48 ms | 45.27 ms |
| 5ca03f9+dirty | 412.83 ms | 459.40 ms | 46.57 ms |
| f3215d3+dirty | 396.53 ms | 436.66 ms | 40.13 ms |
| 7887847+dirty | 420.47 ms | 460.55 ms | 40.08 ms |
| 23598c3+dirty | 371.92 ms | 420.65 ms | 48.74 ms |
| bc8f61e+dirty | 419.31 ms | 453.39 ms | 34.08 ms |
| 09a902f+dirty | 423.02 ms | 472.18 ms | 49.16 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 37a2091+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| af33f3b+dirty | 49.74 MiB | 55.09 MiB | 5.35 MiB |
| c2e182c+dirty | 49.74 MiB | 54.85 MiB | 5.11 MiB |
| a50b33d+dirty | 43.94 MiB | 48.94 MiB | 5.00 MiB |
| 5ca03f9+dirty | 49.74 MiB | 55.26 MiB | 5.52 MiB |
| f3215d3+dirty | 48.30 MiB | 53.49 MiB | 5.19 MiB |
| 7887847+dirty | 49.74 MiB | 54.81 MiB | 5.07 MiB |
| 23598c3+dirty | 43.94 MiB | 49.02 MiB | 5.08 MiB |
| bc8f61e+dirty | 49.74 MiB | 55.09 MiB | 5.35 MiB |
| 09a902f+dirty | 49.74 MiB | 54.81 MiB | 5.07 MiB |
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 68ae91b+dirty | 3836.36 ms | 1222.04 ms | -2614.32 ms |
| 0b5a379+dirty | 3857.69 ms | 1230.34 ms | -2627.35 ms |
| bf168a4+dirty | 3846.83 ms | 1221.33 ms | -2625.49 ms |
| f170ec3+dirty | 3844.74 ms | 1222.67 ms | -2622.07 ms |
| 68672fc+dirty | 3832.22 ms | 1228.29 ms | -2603.93 ms |
| 84cba31+dirty | 3830.40 ms | 1204.44 ms | -2625.96 ms |
| 2c735cc+dirty | 1223.33 ms | 1224.38 ms | 1.04 ms |
| b9bebee+dirty | 3858.02 ms | 1231.92 ms | -2626.11 ms |
| a50b33d+dirty | 1207.11 ms | 1212.10 ms | 5.00 ms |
| 5569641+dirty | 3824.35 ms | 1210.78 ms | -2613.57 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 68ae91b+dirty | 4.98 MiB | 6.46 MiB | 1.48 MiB |
| 0b5a379+dirty | 5.15 MiB | 6.70 MiB | 1.54 MiB |
| bf168a4+dirty | 4.98 MiB | 6.47 MiB | 1.49 MiB |
| f170ec3+dirty | 5.15 MiB | 6.69 MiB | 1.53 MiB |
| 68672fc+dirty | 5.15 MiB | 6.71 MiB | 1.55 MiB |
| 84cba31+dirty | 4.98 MiB | 6.55 MiB | 1.57 MiB |
| 2c735cc+dirty | 3.38 MiB | 4.74 MiB | 1.35 MiB |
| b9bebee+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| a50b33d+dirty | 3.38 MiB | 4.73 MiB | 1.35 MiB |
| 5569641+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9ad4522+dirty | 420.73 ms | 444.18 ms | 23.45 ms |
| 5a21b51+dirty | 471.42 ms | 524.22 ms | 52.80 ms |
| c2e182c+dirty | 471.64 ms | 553.59 ms | 81.95 ms |
| 15d4514+dirty | 406.77 ms | 428.06 ms | 21.29 ms |
| f170ec3+dirty | 428.71 ms | 452.18 ms | 23.47 ms |
| 3e3142c+dirty | 441.26 ms | 496.06 ms | 54.80 ms |
| 5fe1c6c+dirty | 401.62 ms | 445.28 ms | 43.66 ms |
| 27d9693+dirty | 419.08 ms | 469.12 ms | 50.04 ms |
| 774257e+dirty | 407.09 ms | 447.46 ms | 40.37 ms |
| f9c1ed4+dirty | 431.00 ms | 466.22 ms | 35.22 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9ad4522+dirty | 49.74 MiB | 55.38 MiB | 5.63 MiB |
| 5a21b51+dirty | 48.30 MiB | 53.49 MiB | 5.19 MiB |
| c2e182c+dirty | 49.74 MiB | 54.85 MiB | 5.11 MiB |
| 15d4514+dirty | 48.30 MiB | 53.60 MiB | 5.30 MiB |
| f170ec3+dirty | 48.30 MiB | 53.57 MiB | 5.26 MiB |
| 3e3142c+dirty | 49.74 MiB | 55.44 MiB | 5.70 MiB |
| 5fe1c6c+dirty | 43.75 MiB | 48.14 MiB | 4.39 MiB |
| 27d9693+dirty | 49.74 MiB | 55.09 MiB | 5.34 MiB |
| 774257e+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| f9c1ed4+dirty | 49.74 MiB | 54.86 MiB | 5.12 MiB |
📢 Type of change
📜 Description
Bumps
@sentry/*from11.0.0-beta.1to11.0.0-beta.2acrosspackages/core, the samples anddev-packages/e2e-tests, on top of the beta.0/beta.1 compatibility work (#6665, #6682). The full diff againstmaintherefore includes the beta.0 adaptations, the beta.1 bump and the beta.2 bump.beta.2 required no new source adaptations. Every earlier adaptation carried over unchanged, and beta.2's one RN-relevant breaking change —
attributesis now required in the sampling context — does not affect RN. Build, the full test suite (1929SDK +340tools), lint, format, circular-dep and API report all pass, and the TS 5.0 type-compat guard passes against beta.2.✨ What changed since beta.1
ref(core)!:attributesis now a required field in the sampling context (#24153)SamplingContext;safeTracesSampler(utils/safe.ts) simply forwards...argsto the user'stracesSamplerand falls back totracesSampleRateon throw. The tightened type is produced by core, not by RN, so nothing in the RN layer needs to change and the full suite stays green.feat(core): newdataCollection.queuesoption (#24087)feat:gen_ai.tool.definitionsgated behinddataCollection.genAI.inputs@sentry/server-utils.feat: new Mastra integration +@sentry/react/react-routerentryfeat: low-cardinality serverless span namesfix: Next.js bundling, Cloudflare re-exported classes, Prismadb.query.summary, Supabase double-ended spans, Nuxt/Deno/Ember/Remix/Astroref(nuxt)!: server config bundled into the Nitro build (--importno longer needed);ref(nextjs)!: default environment/deploys no longer prefixed withvercel-Source changes (runtime) — carried over from beta.0/beta.1
tracing/span.ts— real bug fix. v11 no longer stores the active span on ascope._sentrySpanproperty; it keeps aWeakRefunderscope.refs.span. RN'sclearActiveSpanFromScopewas deleting the old (now non-existent) field, so the previous navigation/interaction span was never detached and became the parent of the next root span — corrupting the trace hierarchy for every navigation and UI-interaction transaction. Now clears via the official_INTERNAL_setSpanForScopehelper. This is a latent bug that would ship broken under v11 regardless of the pre-release testing, and the internal field move is not documented in the migration guide.sdk.tsx—traceLifecycle: 'static'pin. v11 defaults span handling to'stream'. Mobile opts into'static'so transactions keep being sent as transaction envelopes (the classic v8 shape the native SDKs ingest), rather than streamed spans. This keeps end-user behavior unchanged.tracing/span.ts/replay/xhrUtils.ts— entry-point split. The@sentry/coremain entry was split into shared / browser / server subpaths.startIdleSpanand theXhrBreadcrumbHinttype moved to@sentry/core/browser. Core ships root-level shim stubs (browser.d.ts/browser.js) so RN's classicmoduleResolution: nodestill resolves the subpath; jest resolves it viaRNTestEnvironment.js. Documented in the migration guide since beta.1.samples/react-nativeTurboModuleScreen.tsx— sample fix. The TurboModule Playground screen read the aggregatedturbo_module.*attributes viaspanToJSON(span).data, which v11 empties (the streamed shape has no.data), so the screen rendered nothing and theturboModuleSpanAttributese2e flow failed on both iOS and Android. Switched tospanToStaticSpanJSON— the classic-shape helper the SDK already uses internally.When the SDK bundles
@sentry/* v11, the following are user-visible breaking changes. Anything RN could absorb has been absorbed (see the last sub-list) so this set is the residue users still need to know about. beta.2 adds nothing new here.Confirmed breaking:
Scope.clear()removedScopeis re-exported from@sentry/react-native;getCurrentScope().clear()(or.clear()on any scope) no longer exists.withScope/withIsolationScope, or re-init the SDK.spanToJSON()shape changed@sentry/react-native. Now returns the streamed shape (name,attributes,status: 'ok' | 'error',end_timestamp,is_segment, …) instead of the classicdescription/op/data/timestamp/origin/measurements. Code reading classic fields (e.g. inbeforeSendTransaction) breaks.event.spansdirectly, or the classic-shape helper (RN re-exportingspanToStaticSpanJSONis a follow-up — see Next steps).span.setStatus({ code: SPAN_STATUS_ERROR, message: 'my text' })— only canonical status strings survive; any non-canonical message now surfaces asinternal_error, so custom status text is lost.InboundFilters→EventFiltersinboundFiltersIntegrationstill works (aliased), but the integration'snameis now"EventFilters". Looking up / removing the integration by the string"InboundFilters"breaks."EventFilters".instrumentOpenAiClient,instrumentAnthropicAiClient,instrumentGoogleGenAIClient,createLangChainCallbackHandler, the LangGraph helpers, etc. are no longer re-exported from@sentry/react-native(moved to the server-only@sentry/server-utils, which RN does not depend on). Documented in the migration guide since beta.1.@sentry/typesno longer published@sentry/core. Direct imports from@sentry/typesbreak.@sentry/react-native(or@sentry/core).any→unknown)SamplingContext.attributesnow requiredtracesSamplerand readsamplingContext.attributesno longer need a presence check — the field is always provided. Not breaking for RN's own layer (it forwards the context unchanged), and additive for users, but noted for completeness.In progress — will be handled before the bump (tracked, not decided in this spike):
sendDefaultPii→dataCollection. Dedicated Linear project; theinfer_ipPII gap is scoped to logs + metrics envelopes only (events / sessions / spans are already safe). Intent is for users to keep working without a forced rename. beta.2 continues to expanddataCollection(newdataCollection.queuessub-option), so the eventual RN mapping should account for the fulldataCollectionshape, not justsendDefaultPii.@sentry/corev11 no longer ships TS 3.8 types — it droppedbuild/types-ts3.8and itstypesVersionsmapping — so TS 3.8 falls back to the modern.d.tsand fails to parse them (skipLibCheckcan't help: it skips type-checking, not parsing). This raises the floor to TS 5.0.4. Done in this branch: the CI type-compat guard was retargeted from TS 3.8 to 5.0.4 (ts3.8-test→ts5.0-test); verified@sentry/react-native→@sentry/core@11.0.0-beta.2type-checks cleanly under 5.0.4. Still open: RN currently still down-levels and ships its own TS 3.8 types; whether to drop that (and formally raise the documented minimum) is the remaining decision. Tracked as RN-754 / Raise minimum TypeScript to 5.0.4 and drop TS 3.8 support (v9) #6657.Explicitly NOT breaking for RN users (RN preserves v8 behavior):
traceLifecycle: 'static'; transactions still send as envelopes.enableLogs— RN re-declares the option.attachStacktracedefault — RN already defaults it totrue.enableMetricsremoval — was never a public RN option, so nothing to migrate.💡 Motivation and Context
Continuous validation of the JS v11 pre-releases ahead of the RN major (RN-586). Confirms whether each pre-release introduces new breakages, catalogues the user-facing breaking surface, and re-verifies the known gaps still need covering. beta.2 is a clean bump — no new RN-facing breakage. Its one RN-relevant breaking change (
attributesrequired in the sampling context) is absorbed for free because RN forwards the sampling context unchanged rather than constructing it. The full set of v11 findings still handled in this branch:scope.refs.spanWeakRefclearActiveSpanFromScope(runtime bug).@sentry/coreentry-point split (browser subpath)startIdleSpan/XhrBreadcrumbHintimports moved to@sentry/core/browser. Documented upstream since beta.1.@sentry/server-utilstraceLifecycle: 'static'.spanToJSONshape changedspanToStaticSpanJSONinternally; RN sample's TurboModule screen switched tospanToStaticSpanJSON; user-facing re-export flagged.internal_errorsentry.source: 'custom'Scope.clear()removedresetScopetest helper.InboundFilters→EventFiltersrenameeventFiltersIntegrationaliased asinboundFiltersIntegration.SamplingContext.attributesnow required (beta.2)safeTracesSampler.ts3.8-test→ts5.0-test).💚 How did you test it?
yarn build— clean.yarn lint, format,yarn circularDepCheck— pass.yarn api-report:check— passes (RN's public surface is unchanged by beta.2).@sentry/react-native→@sentry/core@11.0.0-beta.2type-checks with exit 0.yarn test— all green (1929SDK +340tools + 1). No test changes were needed on top of beta.1; in particular the sampling-contextattributes-required change caused no failures because RN forwards the context unchanged. All earlier beta.0/beta.1 adaptations (spanToJSON→spanToStaticSpanJSONwhere the classic shape is asserted;startIdleSpanfrom@sentry/core/browser;Scope.clear()→resetScopehelper; non-canonical status →internal_error; child-spansentry.sourcedropped;app.startsnapshot re-locked; obsoleteenableMetricsand AI-exports tests removed) continue to pass under beta.2.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
sendDefaultPii→dataCollectionmigration (logs/metrics PII, now a widerdataCollectionsurface includingqueues), re-exportingspanToStaticSpanJSONso users keep a classic-shape helper, and the down-levelled-types shipping decision — whether RN stops shipping its own TS 3.8 types and formally raises the documented minimum to 5.0.4 (RN-754). The CI type-compat guard is already retargeted to 5.0.4 in this branch.attributesrequired in the sampling context) is documented in the beta.2 migration guide and is absorbed for free by RN. The only remaining undocumented internal is the active-span field move (_sentrySpan→scope.refs.spanWeakRef), which is intentionally not raised as an API-stability ask: RN already relies on core internals like_INTERNAL_flushLogsBuffer, and switching to_INTERNAL_setSpanForScopeis more stable than the raw private-field access it replaced.