diff --git a/MIGRATION.md b/MIGRATION.md index 84e02afcde8a..8e1990930207 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1329,6 +1329,7 @@ The `idleTimeout`, `finalTimeout` and `childSpanTimeout` options of interaction - (AWS Lambda) The deprecated `tryPatchHandler` function was removed. It was no longer used. - (Express) The deprecated `patchExpressModule(options)` signature was removed. Use `patchExpressModule(moduleExports, getOptions)` instead. - (Express) The `shouldHandleError` option was removed from `setupExpressErrorHandler` and `expressErrorHandler`, along with the `ExpressHandlerOptions` type. Configure it on `expressIntegration()` instead. See [Express: errors are captured automatically](#express-errors-are-captured-automatically). +- (Express) `ExpressIntegrationOptions` is no longer exported from `@sentry/core`. Import it from `@sentry/node` instead — that version is the one `expressIntegration()` accepts, and it carries `shouldHandleError`. - (Fastify) The deprecated `instrumentFastify` and `handleFastifyError` exports were removed. `fastifyIntegration` now instruments Fastify (v3.21–v5) and captures errors on its own, so neither export is needed. See [Fastify: `setupFastifyErrorHandler` is deprecated](#fastify-setupfastifyerrorhandler-is-deprecated). - The `@sentry/node-core/light/otlp` entry point was removed, along with its optional `@opentelemetry/exporter-trace-otlp-http` peer dependency. `otlpIntegration` is now exported directly from every server-side SDK, so `Sentry.otlpIntegration()` needs no extra import or install. - The `otlpIntegration` options `setupOtlpTracesExporter` and `collectorUrl` were removed, and the integration no longer sets up a span exporter, span processor, or tracer provider. Configure your own exporter and point it at `Sentry.getOtlpTracesEndpoint(dsn)`, or at your collector's URL if you route through one. See [Connecting Sentry to your OpenTelemetry traces](#connecting-sentry-to-your-opentelemetry-traces). diff --git a/packages/core/src/server.ts b/packages/core/src/server.ts index 0accf0ad69ce..2d2d76127f6a 100644 --- a/packages/core/src/server.ts +++ b/packages/core/src/server.ts @@ -17,11 +17,7 @@ export { callFrameToStackFrame, watchdogTimer } from './utils/anr'; export { safeUnref as _INTERNAL_safeUnref } from './utils/timer'; /* oxlint-disable typescript/no-deprecated -- deprecated Express exports, kept until the next major */ export { patchExpressModule } from './integrations/express/index'; -export type { - ExpressIntegrationOptions, - ExpressMiddleware, - ExpressErrorMiddleware, -} from './integrations/express/types'; +export type { ExpressMiddleware, ExpressErrorMiddleware } from './integrations/express/types'; /* oxlint-enable typescript/no-deprecated */ export { instrumentPostgresJsSql, diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index d98bf3ed9ce7..3b18ac957f07 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -8,6 +8,7 @@ export { anthropicAIIntegration, dataloaderIntegration, expressIntegration, + type ExpressIntegrationOptions, firebaseIntegration, genericPoolIntegration, googleGenAIIntegration, diff --git a/packages/server-utils/src/index.ts b/packages/server-utils/src/index.ts index 23ca1098ef84..e772e02c5c3d 100644 --- a/packages/server-utils/src/index.ts +++ b/packages/server-utils/src/index.ts @@ -51,9 +51,9 @@ export { postgresJsIntegration } from './integrations/postgres-js'; export { tediousIntegration } from './integrations/tedious'; export { vercelAIIntegration } from './integrations/vercel-ai'; export { expressIntegration } from './integrations/express'; +export type { ExpressIntegrationOptions } from './integrations/express/types'; /* oxlint-disable typescript/no-deprecated -- deprecated Express error-handler exports, kept until the next major */ export { expressErrorHandler, setupExpressErrorHandler } from './integrations/express/error-handler'; -export type { ExpressIntegrationOptions } from './integrations/express/types'; /* oxlint-enable typescript/no-deprecated */ export { firebaseIntegration } from './integrations/firebase';