-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(server): Add Reporting API server helpers #14044
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
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?
I'm a little hesitant in the public API requiring
browserStackParser
, but I guess there's no good way around this.
We should pull stack parsing for now since:
- Origin trials should not be used with all users in production
- It might never make it to production Chrome
- I haven't managed to get it working
I also think
handleReportingApi
should becaptureX
instead. What do you think?
Yep, much better!
We should pull stack parsing for now since:
- I haven't managed to get it working
I've managed to get this working in an Electron application. Here's what was required:
- Add
document-policy: include-js-call-stacks-in-crash-reports
response header to page - Launch Chromium with
--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports
flag
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 unresponsive
event?
I haven't looked at the code, I'm simply guessing it uses similar code paths to triggering the Reporting API unresponsive events
samuelmaddock
commented
Nov 12, 2024
@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 unresponsive
to wait for that data if that's the design we go with.
cloudcome
commented
Jan 17, 2025
什么时候可以被合并?
When can it be merged?
@cloudcome this is not prioritzed at the moment given we have some other things to get done first. We'll push this forward when this becomes a priority again. Thanks for your patience in the mean time.
Uh oh!
There was an error while loading. Please reload this page.
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: