Skip to content

Commit 163fc2f

Browse files
committed
ref(express)!: Export a single ExpressIntegrationOptions type
1 parent fe1b7ef commit 163fc2f

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
@@ -1265,6 +1265,7 @@ The `idleTimeout`, `finalTimeout` and `childSpanTimeout` options of interaction
12651265
- (AWS Lambda) The deprecated `tryPatchHandler` function was removed. It was no longer used.
12661266
- (Express) The deprecated `patchExpressModule(options)` signature was removed. Use `patchExpressModule(moduleExports, getOptions)` instead.
12671267
- (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).
1268+
- (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`.
12681269
- (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).
12691270
- 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.
12701271
- 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
@@ -20,11 +20,7 @@ export { callFrameToStackFrame, watchdogTimer } from './utils/anr';
2020
export { safeUnref as _INTERNAL_safeUnref } from './utils/timer';
2121
/* oxlint-disable typescript/no-deprecated -- deprecated Express exports, kept until the next major */
2222
export { patchExpressModule } from './integrations/express/index';
23-
export type {
24-
ExpressIntegrationOptions,
25-
ExpressMiddleware,
26-
ExpressErrorMiddleware,
27-
} from './integrations/express/types';
23+
export type { ExpressMiddleware, ExpressErrorMiddleware } from './integrations/express/types';
2824
/* oxlint-enable typescript/no-deprecated */
2925
export {
3026
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)