Title: Remove global `installedIntegrations` variable · Issue #7028 · getsentry/sentry-javascript · GitHub
Open Graph Title: Remove global `installedIntegrations` variable · Issue #7028 · getsentry/sentry-javascript
X Title: Remove global `installedIntegrations` variable · Issue #7028 · getsentry/sentry-javascript
Description: Problem Statement While debugging a failing replay integration test in #7011, we just realized that the global installedIntegrations causes problems for the replay integration CDN bundle. This is problematic, because the replay integrati...
Open Graph Description: Problem Statement While debugging a failing replay integration test in #7011, we just realized that the global installedIntegrations causes problems for the replay integration CDN bundle. This is p...
X Description: Problem Statement While debugging a failing replay integration test in #7011, we just realized that the global installedIntegrations causes problems for the replay integration CDN bundle. This is p...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/7028
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove global `installedIntegrations` variable","articleBody":"### Problem Statement\n\nWhile debugging a failing replay integration test in #7011, we just realized that the global [`installedIntegrations`](https://github.com/getsentry/sentry-javascript/blob/c636940bc5ea9235053233fae53c3bb1332abc15/packages/core/src/integration.ts#L13) causes problems for the replay integration CDN bundle. \r\n\r\nThis is problematic, because the replay integration CDN bundle will get its own copy of `installedIntegrations`, which will always be empty as it is not populated by the SDK:\r\n\r\n```\r\n// Both bundles maintain separate copies of `installedIntegrations` and only the SDK's field will be used\r\nSDk bundle\r\n\tsentry.init()\r\n\tsentry.addinitegration()\r\n\tinstalledIntegrations = [ 'Replay', 'Dedupe', ....]\r\n\r\nreplay bundle\r\n\tinstalledIntegrations = []\r\n\tprepareEvent() // prepareEvent accesses installedIntegrations but takes the replay bundle's version, which will always be empty\r\n```\n\n### Solution Brainstorm\n\nWe should get rid of this global as this is very problematic, albeit in this particular case, only for the replay integration. \r\nIt should be good enough to use the `_integrations` field in `BaseClient` to avoid a breaking change for now and once we move to v8, we can add public getter/a cleaner way to access this field.","author":{"url":"https://github.com/Lms24","@type":"Person","name":"Lms24"},"datePublished":"2023-02-01T14:33:58Z","url":"https://github.com/getsentry/sentry-javascript/issues/7028"}
| 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:96e7eafb-8074-a02d-9ec5-075c627e0bc9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B9E:31FAF9:70498:9BA50:6B04A3B6 |
| html-safe-nonce | 1e08a23eae81b5376c380f6114892194ba4e470d7f9754e618f304b6e22c9501 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjlFOjMxRkFGOTo3MDQ5ODo5QkE1MDo2QjA0QTNCNiIsInZpc2l0b3JfaWQiOiI2NTk1MTAyMTU4MDMzODIyNjQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | eca91ebe1074cb8cd1f1261a36d4d208d83c81fdd7f038a5c40437af0c856b96 |
| hovercard-subject-tag | issue:1566225898 |
| 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/7028/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f0c3798b155be8db84295e78a924c9ce17b4bfffa27b9f3a0abc55fe98ef143e/getsentry/sentry-javascript/issues/7028 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0c3798b155be8db84295e78a924c9ce17b4bfffa27b9f3a0abc55fe98ef143e/getsentry/sentry-javascript/issues/7028 |
| og:image:alt | Problem Statement While debugging a failing replay integration test in #7011, we just realized that the global installedIntegrations causes problems for the replay integration CDN bundle. This is p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lms24 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| 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 | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| 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