-
-
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(node): Rework ANR to use worker script via an integration #9823
feat(node): Rework ANR to use worker script via an integration #9823
Conversation
…anr-worker-thread
This comment was marked as outdated.
This comment was marked as outdated.
|
||
const { poll } = watchdogTimer(createHrTimer, options.pollInterval, options.anrThreshold, watchdogTimeout); | ||
|
||
parentPort?.on('message', (msg: { session: Session | undefined }) => { |
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.
parentPort?.on('message', (msg: { session: Session | undefined }) => { | |
parentPort?.on('message', (msg: { session?: Session }) => { |
…nto anr-worker-from-base64-script
This PR now also fetches the |
Emitting files into our src folder is very bad for a lot of reasons - caching, build order, general reproducability. We need to change this. |
Pls do not do this immediately as I am restructuring our rollup configs right now and I am hotfixing this but this is high prio. |
Sorry I have to revert this PR. It has too many bad implications with the build process. |
This PR reworks Node ANR detection to use a worker thread. Workers are usually started via a path to a source file but this can cause issues when bundlers are used. Instead, the worker code is bundled and included in the source as a base64 string which can be used to launch a worker via a data URL. The base64 code comes in at around 45KB.
Closes #9324 by adding trace context.
Also aids with solving getsentry/sentry-electron#784
Relies on #9018 being merged so module and app/device context are included.Positives 👍
Negatives 👎
Usage