-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(server): Add Reporting API server helpers #14044
base: develop
Are you sure you want to change the base?
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little hesitant in the public API requiring browserStackParser
, but I guess there's no good way around this.
I also think handleReportingApi
should be captureX
instead. What do you think?
We should pull stack parsing for now since:
Yep, much better! |
I've managed to get this working in an Electron application. Here's what was required:
From reading the browser and renderer process code, I believe this should be enough to send the call stacks. So far this data has been valuable for us so I'd love to see it supported in Sentry! One more thing to note. DevTools needs to be closed for the renderer to become unresponsive and send the call stack. I wrote this snippet to test. function startInfiniteLoop () {
console.log('spinning');
while (1) {
document.documentElement.getBoundingClientRect();
}
}
// Click the document to start the infinite loop
document.documentElement.addEventListener('click', function clickHandler () {
startInfiniteLoop();
}); |
@samuelmaddock could Electron pass the stack trace through in the webContents I haven't looked at the code, I'm simply guessing it uses similar code paths to triggering the Reporting API unresponsive events |
@timfish I started working on this in electron/electron#44204 I'm hoping to get back to that PR soon. The call stacks use a separate async request so Electron may need to delay |
The Sentry backend doesn't support the Reporting API yet but since same-origin reports have cookies/authentication included, it will often make more sense to send these via your server so you can include user context via middleware etc.
This PR:
@sentry/core
that help capture reports (below)crash
reports as new eventsNew
@sentry/core
exports:Express example: