feat: Renderer process ANR detection with stack traces - #770
Conversation
AbhiPrasad
left a comment
There was a problem hiding this comment.
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.tsin 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.