sentry-javascript
sentry-javascript copied to clipboard
Page crash monitoring, such as page memory overflow
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which package are you using?
@sentry/vue
SDK Version
6.19.2
Framework Version
6.19.2
Link to Sentry event
No response
Steps to Reproduce
I have a page with a lot of charts, which needs to hang on the big screen for a long time. In a certain period of time, the memory overflows due to the business, which makes the browser crash, but sentry does not report it.
Expected Result
sentry can report page crashes.
Actual Result
When a page crash occurs, sentry does nothing.
Hi, thanks for writing in. I will backlog this so we have it written down, however it is very unlikely that we will ever get to doing this. It is pretty much impossible to detect page crashes, simply because JS is single threaded. A page running OOM or any script that's blocking would also prevent Sentry SDK code from being run, so we cannot report the crash.
In the mean time, you could build your own integration leveraging SessionStorage to keep state as per: http://jasonjl.me/blog/2015/06/21/taking-action-on-browser-crashes/, and manually report page crashes. This might have some false positives though that you'll have to look at.
In the mean time, you could build your own integration leveraging
SessionStorageto keep state as per: http://jasonjl.me/blog/2015/06/21/taking-action-on-browser-crashes/, and manually report page crashes. This might have some false positives though that you'll have to look at.
Thank you for your reply. At present, we use service worker to monitor the crash of the page, but there will be false positives in many cases. for example, when the browser print pop-up, alert pop-up and so on. It will cause the system to freeze, resulting in false positives. So we've given up on collecting crash performance metrics.
Refer to: https://medium.com/@JackPu/how-to-check-browser-crash-via-javascript-fa7d5af5e80b
Would love to see this
FYI folks - we're taking a look at the Reporting-Endpoints API to help identify page crashes: https://github.com/getsentry/sentry/issues/38940. The browser API should allow us to get browser crash info into Sentry.
While we work on getting that built in to Sentry, I recommend checking it out! You can probably set up an endpoint that just constructs a Sentry event from the info and sends it along to Sentry.
Closing this since it belongs into sentry repo