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
8.0.0
Framework Version
Express 4.17.17
Link to Sentry event
No response
SDK Setup
Sentry.init({
enabled: true,
dsn: process.env.NODE_ENV === "production" ? process.env.SENTRY_DSN : "",
debug: process.env.NODE_ENV !== "production" ? true : false,
release: process.env.npm_package_version,
environment: process.env.NODE_ENV,
sampleRate: 0.5,
maxBreadcrumbs: 100,
sendClientReports: true,
integrations: [nodeProfilingIntegration()],
tracesSampleRate: 0.5,
profilesSampleRate: 0.5,
});
Steps to Reproduce
- Run dev environment where DSN is not provided (in order to not spam Sentry with bugs in dev)
- Observe message in console:
[Sentry] Express is not instrumented. This is likely because you required/imported express before calling Sentry.init().
- I have confirmed I am importing files in the correct order and using
Sentry.setupExpressErrorHandler(app);
. - When providing a DSN in dev, the "not instrumented" message is not sent, and Sentry works and logs events as expected.
Expected Result
I should only see:
Sentry Logger [warn]: No DSN provided, client will not send events.
message in the console, and not the:
[Sentry] Express is not instrumented. This is likely because you required/imported express before calling
Sentry.init().
message, if my app is set up correctly.
Actual Result

Metadata
Metadata
Assignees
Type
Projects
Status
No status