Closed
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
7.102.0
Framework Version
espress.js
Link to Sentry event
No response
SDK Setup
Sentry.init({
dsn: process.env.SENTRY_DNS,
release: 'n/a',
environment: process.env.NODE_ENV,
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Sentry.Integrations.Express({
app,
methods: ['post', 'get', 'delete'],
}),
],
tracesSampleRate: 0,
});
Steps to Reproduce
- add
app.use(Sentry.Handlers.requestHandler());
- run request
- check profile
Expected Result
n/a
Actual Result
I would like to point out that the problem is not one-to-one. That is, not every request gets stuck in memory. After dozens of requests, only one object can be added, and sometimes more. I didn't find any particular pattern.


You may notice that multiple hubs are created, and the data (in locals) is not removed from the response object (and the response object is not deleted either).
if remove app.use(Sentry.Handlers.requestHandler());
, there are no memory issues.
Metadata
Metadata
Assignees
Type
Projects
Status
No status