Title: Sentry constantly triggering change detection in Angular2+ application. · Issue #1800 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sentry constantly triggering change detection in Angular2+ application. · Issue #1800 · getsentry/sentry-javascript
X Title: Sentry constantly triggering change detection in Angular2+ application. · Issue #1800 · getsentry/sentry-javascript
Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.
Open Graph Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.
X Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.
Opengraph URL: https://github.com/getsentry/sentry-javascript
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry constantly triggering change detection in Angular2+ application.","articleBody":"Hey, I installed the new unified Sentry SDK in my Angular 7 project, and everything was working as expected, after a few days I noticed that the application performance had reduced, I tried to debug it and found that when I initialise the Sentry SDK, angular starts running change detection at an interval of few ms and it doesn't stop. I think there might be some asynchronous event that is getting captured inside Angular zone. Below are the details to reproduce this issue.\r\n\r\nInside your app module add the following code\r\n\r\n```\r\nexport class AppModule {\r\n constructor(applicationRef: ApplicationRef) {\r\n \r\n //Angular change detection is run inside applicationRef.tick\r\n //method. We are overriding this to log whenever change detection\r\n //happens.\r\n \r\n const originalTick = applicationRef.tick;\r\n \r\n applicationRef.tick = function() {\r\n const before = performance.now();\r\n\r\n originalTick.apply(this, arguments);\r\n\r\n const after = performance.now();\r\n console.log(\"CHANGE DETECTION:\", after - before);\r\n\r\n return originalTick;\r\n }\r\n\r\n //Initialise Sentry with your DSN\r\n\r\n Sentry.init({\r\n dsn: __YOUR_SENTRY_DSN__\r\n });\r\n }\r\n```\r\n\r\nYou can check the logs before and after commenting Sentry init part.\r\nThis has a lot of impact on our application's performance.\r\n\r\nPlease note that this issue didn't occur in the deprecated raven-js library.","author":{"url":"https://github.com/surajpoddar16","@type":"Person","name":"surajpoddar16"},"datePublished":"2018-12-17T09:49:37Z","url":"https://github.com/getsentry/sentry-javascript/issues/1800"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:8d73e3cc-9b2f-ed1f-7843-a6750404ad44 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B674:7AD3E:2C540D:3D4596:6B045516 |
| html-safe-nonce | ff27423778ded21c59c1abaf580313862412c85f4c4d2d14819c548dd45adaf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjc0OjdBRDNFOjJDNTQwRDozRDQ1OTY6NkIwNDU1MTYiLCJ2aXNpdG9yX2lkIjoiNzkzMTI1NjM5MDY0NjI1NjkxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c08bb49b2bc70be835548dec9a58495c079482d2cfa9d84685d5052519e1f5af |
| hovercard-subject-tag | repository:3328572 |
| 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/getsentry/sentry-javascript/issues/1800 |
| twitter:image | https://repository-images.githubusercontent.com/3328572/1b73c77d-6488-4ece-9e12-e61d9eb2ac2b |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/3328572/1b73c77d-6488-4ece-9e12-e61d9eb2ac2b |
| og:image:alt | Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub. |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| turbo-cache-control | no-cache |
| 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 | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| 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