Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
dont know
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
- Go to https://syntax.fm/
- Click on shows
- Click on videos
- Repeat steps 2-3 several times
- Notice the number of sentry related functions seems to grow each time
Expected Result
The number of sentry related functions stays constant
Actual Result
The number of sentry related functions seems to grow each time
Additional Context
Possible solution: add {once: true} to event listener options to automatically clean up the listener:
// browserTracingIntegration.ts
// Enable auto finish of the pageload span if users are not explicitly ending it
if (isPageloadSpan && !enableReportPageLoaded && optionalWindowDocument) {
optionalWindowDocument.addEventListener('readystatechange', () => {
emitFinish();
}, {once: true }); // clean up listener automatically
emitFinish();
}
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
dont know
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
Expected Result
The number of sentry related functions stays constant
Actual Result
The number of sentry related functions seems to grow each time
Additional Context
Possible solution: add
{once: true}to event listener options to automatically clean up the listener:Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.