Title: Application Not Responding (ANR) feature breaks use with PM2 · Issue #9131 · getsentry/sentry-javascript · GitHub
Open Graph Title: Application Not Responding (ANR) feature breaks use with PM2 · Issue #9131 · getsentry/sentry-javascript
X Title: Application Not Responding (ANR) feature breaks use with PM2 · Issue #9131 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/9131
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Application Not Responding (ANR) feature breaks use with PM2","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/node\n\n### SDK Version\n\n7.72.0\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n```typescript\r\n Sentry.init({\r\n dsn: process.env.SENTRY_DSN,\r\n release: getSentryReleaseIdentifier(),\r\n environment: process.env.SITE_NAME?.toLowerCase() || undefined,\r\n initialScope: {\r\n tags: { commit: version?.commitSha },\r\n },\r\n });\r\n```\n\n### Steps to Reproduce\n\n1. Enable the new [Application Not Responding](https://docs.sentry.io/platforms/node/configuration/application-not-responding/) feature:\r\n\r\n ```typescript\r\n await Sentry.enableAnrDetection({ captureStackTrace: true });\r\n ```\r\n\r\n2. Configure the application to run within [PM2](https://pm2.keymetrics.io/).\r\n\n\n### Expected Result\n\nThe application works.\n\n### Actual Result\n\nSentry's ANR feature thinks that the application is the ANR watchdog child (because the process has been forked by PM2 and therefore has a `process.send`), so it doesn't work. (In my local testing, it causes PM2 to treat the process as terminated by SIGINT.)\r\n\r\nI could provide a separate `entryScript`, but that wouldn't help the issue of the parent process thinking it's the child. I think I could `delete process.send`, but that seems like a hack (and can break PM2 features). Maybe `enableAnrDetection` needs some sort of \"force\" parameter? Maybe it should assume it's the parent (ignoring `process.send`) if an `entryScript` is provided and/or if `entryScript !== process.arg[1]`?","author":{"url":"https://github.com/joshkel","@type":"Person","name":"joshkel"},"datePublished":"2023-09-27T16:20:54Z","url":"https://github.com/getsentry/sentry-javascript/issues/9131"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:715997d1-1373-525c-bac3-4633cc779a13 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D06E:1AD228:75A19F:9B75CF:6B04C8EC |
| html-safe-nonce | 8800c47e41101a5558e1ff216a82985757789f0299b96c896ec4f6a6359d01ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDZFOjFBRDIyODo3NUExOUY6OUI3NUNGOjZCMDRDOEVDIiwidmlzaXRvcl9pZCI6Ijg3NDkyNDUwNzU1MTY4Njg4NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 62602fa7584fa73e960ce0ff8c961afdcf8f7e08051754cdc1b91fb88628cb07 |
| hovercard-subject-tag | issue:1915925062 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/9131/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d49a3e95cd347377cce2079575ecd12f17afc6d0d49c0b8bd7db0289681e59fe/getsentry/sentry-javascript/issues/9131 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d49a3e95cd347377cce2079575ecd12f17afc6d0d49c0b8bd7db0289681e59fe/getsentry/sentry-javascript/issues/9131 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joshkel |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width