René's URL Explorer Experiment


Title: feat(node): Use worker thread for ANR detection by timfish · Pull Request #9789 · getsentry/sentry-javascript · GitHub

Open Graph Title: feat(node): Use worker thread for ANR detection by timfish · Pull Request #9789 · getsentry/sentry-javascript

X Title: feat(node): Use worker thread for ANR detection by timfish · Pull Request #9789 · getsentry/sentry-javascript

Description: I was looking to add more functionality to the ANR debugger but I've been having niggling feelings surrounding our use of a child process to do this. After much experimenting and debugging I managed to get it working via a worker thread and the inspector APIs connectToMainThread(). Also closes #9324 Pros: No extra processes Only ~20MB memory overhead (vs at least 60MB for a child process) Uses inspector API so we can remove the websockets implementation Cons: Increases the minimum supported node version to v12.11.0 This won't work in Electron since an Electron worker is a plain node thread and does not support Electron APIs. We cannot load the app entry point into the worker like we do here in Node since it'll be using require('electron') This isn't the end of the world since the Electron implementation needs some additional work (getsentry/sentry-electron#784).

Open Graph Description: I was looking to add more functionality to the ANR debugger but I've been having niggling feelings surrounding our use of a child process to do this. After much experimenting and debugging I ma...

X Description: I was looking to add more functionality to the ANR debugger but I've been having niggling feelings surrounding our use of a child process to do this. After much experimenting and debugging ...

Opengraph URL: https://github.com/getsentry/sentry-javascript/pull/9789

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b6c1ad54-12df-8e5a-f278-c6bf4ec94277
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA728:1DFD55:1DA2B4D:27C1D4A:6B040652
html-safe-noncefcacb7bff2d99d708c4e483e094d45b22a318ba939db2ab25e450e76de376805
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzI4OjFERkQ1NToxREEyQjREOjI3QzFENEE6NkIwNDA2NTIiLCJ2aXNpdG9yX2lkIjoiNDkwOTk0MDgxNTY4MzY1MTE1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc74af0da7b9afd2ce3622245015e21c74dd700fd04f560b7132ad013325cd076
hovercard-subject-tagpull_request:1637231646
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/getsentry/sentry-javascript/pull/9789/files
twitter:imagehttps://avatars.githubusercontent.com/u/1150298?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1150298?s=400&v=4
og:image:altI was looking to add more functionality to the ANR debugger but I've been having niggling feelings surrounding our use of a child process to do this. After much experimenting and debugging I ma...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/pull/9789/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F9789%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F9789%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/pull/9789/files
Reloadhttps://github.com/getsentry/sentry-javascript/pull/9789/files
Reloadhttps://github.com/getsentry/sentry-javascript/pull/9789/files
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues342 (342)https://github.com/getsentry/sentry-javascript/issues
Pull requests60 (60)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgetsentry%2Fsentry-javascript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgetsentry%2Fsentry-javascript%2Fissues%2Fnew%2Fchoose
timfishhttps://github.com/timfish
getsentry:develophttps://github.com/getsentry/sentry-javascript/tree/develop
timfish:fix/anr-worker-threadhttps://github.com/timfish/sentry-javascript/tree/fix/anr-worker-thread
Conversation 8 https://github.com/getsentry/sentry-javascript/pull/9789
Commits 9 https://github.com/getsentry/sentry-javascript/pull/9789/commits
Checks 0 https://github.com/getsentry/sentry-javascript/pull/9789/checks
Files changed https://github.com/getsentry/sentry-javascript/pull/9789/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/9789/files
feat(node): Use worker thread for ANR detection https://github.com/getsentry/sentry-javascript/pull/9789/files#top
Show all changes 9 commits https://github.com/getsentry/sentry-javascript/pull/9789/files
ed4a316 feat(node): Use worker thread for ANR detection timfish Dec 9, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/ed4a3168a83933b61292acbe78727bb09b9d3145
14fe3a5 Remove utility timfish Dec 11, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/14fe3a502c141c57652f2a534959641fcfdd43e9
e5c82dd PR feedback timfish Dec 12, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/e5c82dd662b1460a559ac989dd82594b55a38092
d246581 Merge branch 'develop' into fix/anr-worker-thread timfish Dec 12, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/d2465819e85e1ce49853d892e22c02570b8d0490
dce3684 remove outdated comments timfish Dec 12, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/dce36842f10a79275ddf9ed38bd13e8e1549676e
2ca69ca Merge remote-tracking branch 'origin/fix/anr-worker-thread' into fix/… timfish Dec 12, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/2ca69cafedf5a93c147905397ad1fe0052cc9e8b
3042553 use getWorkerThreads timfish Dec 12, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/3042553e706732a78901dc6030041f9f15da153d
dad68a1 Merge branch 'develop' into fix/anr-worker-thread timfish Dec 13, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/dad68a195be51befab1871256039fd246d4b9b58
61dd30f Merge branch 'develop' into fix/anr-worker-thread timfish Dec 13, 2023 https://github.com/getsentry/sentry-javascript/pull/9789/commits/61dd30f13b4d5fd4caa32d6019ec9cf739ac669a
Clear filters https://github.com/getsentry/sentry-javascript/pull/9789/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/9789/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/9789/files
basic-session.js https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-95c61f8a4324e44779261b5081cfe1a6dbcf73e0bca02917b01494a4bf69b59f
basic.js https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-04c1ee8f65194d1b5f102c5776b2dd075df52ecea7034dcd41d16db4cc48693f
basic.mjs https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-3a0324eb5212c2e173ef6cc45d39c03292c09e5f3854c7bcf0dc33eba5a2f92e
forked.js https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-4b34b740ed40d85e1aea5ef26e15f68841e8a5c4e76c06d27dbb300770c5e743
test.ts https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
debugger.ts https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-42e4e09411cea9eaab8e1aca7d5d4b17b0a007e6aced2ae4639e983195586c76
index.ts https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0f2e1a45596e7f28b73fb8b1075452172f6bc433e53d161aaf39dfcb56e4858a
websocket.ts https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-f2bbde181620d8252fd7e62a317eebfbed8881f569d6a9b721d0e6232b631944
sdk.ts https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-76c6af90ca13f38b8d6fe866f3447397f2e34ab2adc0011b05c558884f8828ec
anr.ts https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-33cd8345f5c9f95815f38b325b566e96c88f84aaa4b824813b58ee4210593986
packages/node-integration-tests/suites/anr/basic-session.jshttps://github.com/getsentry/sentry-javascript/pull/9789/files#diff-95c61f8a4324e44779261b5081cfe1a6dbcf73e0bca02917b01494a4bf69b59f
View file https://github.com/timfish/sentry-javascript/blob/61dd30f13b4d5fd4caa32d6019ec9cf739ac669a/packages/node-integration-tests/suites/anr/basic-session.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/9789/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-95c61f8a4324e44779261b5081cfe1a6dbcf73e0bca02917b01494a4bf69b59f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-95c61f8a4324e44779261b5081cfe1a6dbcf73e0bca02917b01494a4bf69b59f
packages/node-integration-tests/suites/anr/basic.jshttps://github.com/getsentry/sentry-javascript/pull/9789/files#diff-04c1ee8f65194d1b5f102c5776b2dd075df52ecea7034dcd41d16db4cc48693f
View file https://github.com/timfish/sentry-javascript/blob/61dd30f13b4d5fd4caa32d6019ec9cf739ac669a/packages/node-integration-tests/suites/anr/basic.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/9789/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-04c1ee8f65194d1b5f102c5776b2dd075df52ecea7034dcd41d16db4cc48693f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-04c1ee8f65194d1b5f102c5776b2dd075df52ecea7034dcd41d16db4cc48693f
packages/node-integration-tests/suites/anr/basic.mjshttps://github.com/getsentry/sentry-javascript/pull/9789/files#diff-3a0324eb5212c2e173ef6cc45d39c03292c09e5f3854c7bcf0dc33eba5a2f92e
View file https://github.com/timfish/sentry-javascript/blob/61dd30f13b4d5fd4caa32d6019ec9cf739ac669a/packages/node-integration-tests/suites/anr/basic.mjs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/9789/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-3a0324eb5212c2e173ef6cc45d39c03292c09e5f3854c7bcf0dc33eba5a2f92e
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-3a0324eb5212c2e173ef6cc45d39c03292c09e5f3854c7bcf0dc33eba5a2f92e
packages/node-integration-tests/suites/anr/forked.jshttps://github.com/getsentry/sentry-javascript/pull/9789/files#diff-4b34b740ed40d85e1aea5ef26e15f68841e8a5c4e76c06d27dbb300770c5e743
View file https://github.com/timfish/sentry-javascript/blob/61dd30f13b4d5fd4caa32d6019ec9cf739ac669a/packages/node-integration-tests/suites/anr/forked.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/9789/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-4b34b740ed40d85e1aea5ef26e15f68841e8a5c4e76c06d27dbb300770c5e743
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-4b34b740ed40d85e1aea5ef26e15f68841e8a5c4e76c06d27dbb300770c5e743
packages/node-integration-tests/suites/anr/test.tshttps://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
View file https://github.com/timfish/sentry-javascript/blob/61dd30f13b4d5fd4caa32d6019ec9cf739ac669a/packages/node-integration-tests/suites/anr/test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/9789/{{ revealButtonHref }}
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
https://github.com/getsentry/sentry-javascript/pull/9789/files#diff-0af0ef940798370fb6cdd7d03fa822ab1e38d9b4cc9c50231f1210ad8cd99b3f
packages/node/src/anr/debugger.tshttps://github.com/getsentry/sentry-javascript/pull/9789/files#diff-42e4e09411cea9eaab8e1aca7d5d4b17b0a007e6aced2ae4639e983195586c76
View file https://github.com/getsentry/sentry-javascript/blob/55ecb4fa769f1ca0a47fd968c6555c4e7ebeb67b/packages/node/src/anr/debugger.ts
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/9789/files
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/9789/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.