-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
5.3.0
Framework Version
express 4.15.13
Link to Sentry event
No response
SDK Setup
Sentry.init({
dsn: 'https://',
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Sentry.Integrations.Express({ app }),
nodeProfilingIntegration()
],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0
})
app.use(Sentry.Handlers.requestHandler())
app.use(Sentry.Handlers.tracingHandler())
app.use(Sentry.Handlers.errorHandler())
Steps to Reproduce
- Try to setup Sentry for Express.js just like instructed from Sentry Dashboard
- You'll get this error: TypeError: Sentry.Integrations.Express is not a constructor
- If you remove this line
new Sentry.Integrations.Express({ app }),
app will not break.
Expected Result
Sentry Express Integration should work.
Actual Result
TypeError: Sentry.Integrations.Express is not a constructor.

It seems like Express Integration is not exported. You can easily check this by calling console.log(Sentry). Express is not available under Integrations objects. That's why new Sentry.Integrations.Http({ tracing: true })
will work, but new Sentry.Integrations.Express({ app })
won't. If you see the result of this log, Http integration is exported, thus, working.

Metadata
Metadata
Assignees
Labels
Projects
Status
Waiting for: Product Owner