Skip to content

Commit 5821de7

Browse files
committed
ref(express)!: Export a single ExpressIntegrationOptions type
1 parent e32ea1f commit 5821de7

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

MIGRATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,7 @@ The `idleTimeout`, `finalTimeout` and `childSpanTimeout` options of interaction
13211321
- (AWS Lambda) The deprecated `tryPatchHandler` function was removed. It was no longer used.
13221322
- (Express) The deprecated `patchExpressModule(options)` signature was removed. Use `patchExpressModule(moduleExports, getOptions)` instead.
13231323
- (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).
1324+
- (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`.
13241325
- (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).
13251326
- 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.
13261327
- 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).

packages/core/src/server-exports.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ export { callFrameToStackFrame, watchdogTimer } from './utils/anr';
1919
export { safeUnref as _INTERNAL_safeUnref } from './utils/timer';
2020
/* oxlint-disable typescript/no-deprecated -- deprecated Express exports, kept until the next major */
2121
export { patchExpressModule } from './integrations/express/index';
22-
export type {
23-
ExpressIntegrationOptions,
24-
ExpressMiddleware,
25-
ExpressErrorMiddleware,
26-
} from './integrations/express/types';
22+
export type { ExpressMiddleware, ExpressErrorMiddleware } from './integrations/express/types';
2723
/* oxlint-enable typescript/no-deprecated */
2824
export {
2925
instrumentPostgresJsSql,

packages/node/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export {
88
anthropicAIIntegration,
99
dataloaderIntegration,
1010
expressIntegration,
11+
type ExpressIntegrationOptions,
1112
firebaseIntegration,
1213
genericPoolIntegration,
1314
googleGenAIIntegration,

packages/server-utils/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ export { postgresJsIntegration } from './integrations/postgres-js';
5151
export { tediousIntegration } from './integrations/tedious';
5252
export { vercelAIIntegration } from './integrations/vercel-ai';
5353
export { expressIntegration } from './integrations/express';
54+
export type { ExpressIntegrationOptions } from './integrations/express/types';
5455
/* oxlint-disable typescript/no-deprecated -- deprecated Express error-handler exports, kept until the next major */
5556
export { expressErrorHandler, setupExpressErrorHandler } from './integrations/express/error-handler';
56-
export type { ExpressIntegrationOptions } from './integrations/express/types';
5757
/* oxlint-enable typescript/no-deprecated */
5858
export { firebaseIntegration } from './integrations/firebase';
5959

0 commit comments

Comments
 (0)