From dd3d42ae9e87122340e716451d1445f19484ba4d Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 3 Sep 2026 11:23:52 +0200 Subject: [PATCH 1/3] docs(migration): Document the `@sentry/core` entrypoint split --- MIGRATION.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/MIGRATION.md b/MIGRATION.md index 994557cbadc4..a981addafd42 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1243,6 +1243,35 @@ Affected SDKs: `@sentry/react-router`. ### `@sentry/core` / All SDKs +- `@sentry/core` now exports only isomorphic code. Browser-only exports live on `@sentry/core/browser` and server-only exports on `@sentry/core/server`, and neither subpath re-exports the shared surface any more. This keeps server-only code (HTTP instrumentation, ANR, postgres and sql helpers) out of browser bundles. Most of these APIs are also re-exported by the platform SDKs (`@sentry/node`, `@sentry/browser`, ...), which is unchanged, so this only affects code importing straight from `@sentry/core`. TypeScript reports it as `has no exported member`. + +```js +// before +import { loadModule, trpcMiddleware } from '@sentry/core'; +import type { BrowserClientReplayOptions } from '@sentry/core'; + +// after +import { loadModule, trpcMiddleware } from '@sentry/core/server'; +import type { BrowserClientReplayOptions } from '@sentry/core/browser'; +``` + +Isomorphic APIs stay on `@sentry/core`, so a single import may need splitting in two: + +```js +// before +import { fill, isThenable, loadModule } from '@sentry/core'; + +// after +import { fill, isThenable } from '@sentry/core'; +import { loadModule } from '@sentry/core/server'; +``` + +Only on `@sentry/core/browser`: `startIdleSpan`, and the `BrowserClientReplayOptions`, `XhrBreadcrumbData` and `XhrBreadcrumbHint` types. + +Only on `@sentry/core/server`: `ServerRuntimeClient`, `trpcMiddleware`, `wrapMcpServerWithSentry`, `loadModule`, `isNodeEnv`, `node`, `nodeStackLineParser`, `filenameIsInApp`, `vercelWaitUntil`, `flushIfServerless`, `watchdogTimer`, `callFrameToStackFrame`, `patchExpressModule`, `instrumentPostgresJsSql`, `DEFAULT_IGNORE_STATUS_CODES`, the HTTP helpers (`patchHttpModuleClient`, `getHttpClientSubscriptions`, `getHttpServerSubscriptions`, `isStaticAssetRequest`, `processHttpServerTransactionEvent`, `recordRequestSession`, `addOutgoingRequestBreadcrumb`, `getRequestUrl`, `getRequestUrlObject`, `getRequestUrlFromClientRequest`, `getRequestOptions`, `HTTP_ON_CLIENT_REQUEST`, `HTTP_ON_SERVER_REQUEST`), and the `ServerRuntimeClientOptions`, `ServerRuntimeOptions`, `ExpressMiddleware`, `ExpressErrorMiddleware`, `HttpInstrumentationOptions`, `HttpClientRequest`, `HttpIncomingMessage`, `HttpServerResponse`, `HttpModuleExport`, `PostgresConnectionContext` and `SqlDialect` types. + +`startSpan`, `startInactiveSpan` and `startSpanManual` are still exported from `@sentry/core`. The variants on `@sentry/core/browser` are browser-specific ones that also set up span streaming. + - The internal, deprecated `addAutoIpAddressToUser` export was removed. - `Scope.clear()` was removed. To reset scope state, re-initialize the SDK or run your code in a fresh scope via `withScope`/`withIsolationScope`. - The deprecated positional `spanOrigin` argument of `instrumentFetchRequest` was removed. Pass an options object (e.g. `{ spanOrigin }`) as the last argument instead. From dc240f4a8e3ba4126ded5b865abe1e7d96e6befa Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 3 Sep 2026 11:27:12 +0200 Subject: [PATCH 2/3] Drop the redundant split-import example --- MIGRATION.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index a981addafd42..626b0dd7e5ec 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1255,17 +1255,6 @@ import { loadModule, trpcMiddleware } from '@sentry/core/server'; import type { BrowserClientReplayOptions } from '@sentry/core/browser'; ``` -Isomorphic APIs stay on `@sentry/core`, so a single import may need splitting in two: - -```js -// before -import { fill, isThenable, loadModule } from '@sentry/core'; - -// after -import { fill, isThenable } from '@sentry/core'; -import { loadModule } from '@sentry/core/server'; -``` - Only on `@sentry/core/browser`: `startIdleSpan`, and the `BrowserClientReplayOptions`, `XhrBreadcrumbData` and `XhrBreadcrumbHint` types. Only on `@sentry/core/server`: `ServerRuntimeClient`, `trpcMiddleware`, `wrapMcpServerWithSentry`, `loadModule`, `isNodeEnv`, `node`, `nodeStackLineParser`, `filenameIsInApp`, `vercelWaitUntil`, `flushIfServerless`, `watchdogTimer`, `callFrameToStackFrame`, `patchExpressModule`, `instrumentPostgresJsSql`, `DEFAULT_IGNORE_STATUS_CODES`, the HTTP helpers (`patchHttpModuleClient`, `getHttpClientSubscriptions`, `getHttpServerSubscriptions`, `isStaticAssetRequest`, `processHttpServerTransactionEvent`, `recordRequestSession`, `addOutgoingRequestBreadcrumb`, `getRequestUrl`, `getRequestUrlObject`, `getRequestUrlFromClientRequest`, `getRequestOptions`, `HTTP_ON_CLIENT_REQUEST`, `HTTP_ON_SERVER_REQUEST`), and the `ServerRuntimeClientOptions`, `ServerRuntimeOptions`, `ExpressMiddleware`, `ExpressErrorMiddleware`, `HttpInstrumentationOptions`, `HttpClientRequest`, `HttpIncomingMessage`, `HttpServerResponse`, `HttpModuleExport`, `PostgresConnectionContext` and `SqlDialect` types. From df50276447f83eebf8a1c38d22e0d5bb33bad914 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 3 Sep 2026 11:27:47 +0200 Subject: [PATCH 3/3] Drop the moved-symbol lists --- MIGRATION.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 626b0dd7e5ec..68cf36299701 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1255,12 +1255,6 @@ import { loadModule, trpcMiddleware } from '@sentry/core/server'; import type { BrowserClientReplayOptions } from '@sentry/core/browser'; ``` -Only on `@sentry/core/browser`: `startIdleSpan`, and the `BrowserClientReplayOptions`, `XhrBreadcrumbData` and `XhrBreadcrumbHint` types. - -Only on `@sentry/core/server`: `ServerRuntimeClient`, `trpcMiddleware`, `wrapMcpServerWithSentry`, `loadModule`, `isNodeEnv`, `node`, `nodeStackLineParser`, `filenameIsInApp`, `vercelWaitUntil`, `flushIfServerless`, `watchdogTimer`, `callFrameToStackFrame`, `patchExpressModule`, `instrumentPostgresJsSql`, `DEFAULT_IGNORE_STATUS_CODES`, the HTTP helpers (`patchHttpModuleClient`, `getHttpClientSubscriptions`, `getHttpServerSubscriptions`, `isStaticAssetRequest`, `processHttpServerTransactionEvent`, `recordRequestSession`, `addOutgoingRequestBreadcrumb`, `getRequestUrl`, `getRequestUrlObject`, `getRequestUrlFromClientRequest`, `getRequestOptions`, `HTTP_ON_CLIENT_REQUEST`, `HTTP_ON_SERVER_REQUEST`), and the `ServerRuntimeClientOptions`, `ServerRuntimeOptions`, `ExpressMiddleware`, `ExpressErrorMiddleware`, `HttpInstrumentationOptions`, `HttpClientRequest`, `HttpIncomingMessage`, `HttpServerResponse`, `HttpModuleExport`, `PostgresConnectionContext` and `SqlDialect` types. - -`startSpan`, `startInactiveSpan` and `startSpanManual` are still exported from `@sentry/core`. The variants on `@sentry/core/browser` are browser-specific ones that also set up span streaming. - - The internal, deprecated `addAutoIpAddressToUser` export was removed. - `Scope.clear()` was removed. To reset scope state, re-initialize the SDK or run your code in a fresh scope via `withScope`/`withIsolationScope`. - The deprecated positional `spanOrigin` argument of `instrumentFetchRequest` was removed. Pass an options object (e.g. `{ spanOrigin }`) as the last argument instead.