-
-
Notifications
You must be signed in to change notification settings - Fork 58
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: Renderer process ANR detection with stack traces #770
Conversation
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 in favor of turning it on by default 👍
This PR is still waiting on a few upstream bits to be released but it's now configured entirely from the renderer process. import { init } fron '@sentry/electron/renderer';
init({
dsn: '__DSN__',
anrDetection: { pollInterval: 200, anrThreshold: 2000, captureStackTrace: true },
}) It also now enables renderer ANR by default but without stack traces enabled since this will add overhead. Since renderer ANR is no longer configured form the main process, we should probably change how the main process ANR is configured since this was chosen to leave config points for the renderer. Current: await enableAnrDetection({ mainProcess: { captureStackTrace: true }});
runApp(); I think this should probably highlight its for the main process only: await enableMainProcessAnrDetection({ captureStackTrace: true });
runApp(); |
anr utils changes released with https://github.com/getsentry/sentry-javascript/releases/tag/7.74.0 |
Done, @AbhiPrasad what do you think about the above mentioned renaming of |
Yeah I think let's use |
970c393
to
371ab99
Compare
When getsentry/sentry-javascript#9191 is merged,
anr-utils.ts
in this PR can be removed.This PR adds ANR detection for the Electron renderer processes.
This is entirely configured from each renderer processes:
Renderer ANR has no overhead unless a renderer starts sending ANR status updates to the main process.