Title: Recommended way to use micro-frontends with Sentry JS SDK · Issue #7622 · getsentry/sentry-javascript · GitHub
Open Graph Title: Recommended way to use micro-frontends with Sentry JS SDK · Issue #7622 · getsentry/sentry-javascript
X Title: Recommended way to use micro-frontends with Sentry JS SDK · Issue #7622 · getsentry/sentry-javascript
Description: After soliciting feedback about micro-frontends from a variety of users and getting issues about it, we need to take steps to define a solid strategy around using Sentry with micro-frontends. The most common thing we heard is that users ...
Open Graph Description: After soliciting feedback about micro-frontends from a variety of users and getting issues about it, we need to take steps to define a solid strategy around using Sentry with micro-frontends. The m...
X Description: After soliciting feedback about micro-frontends from a variety of users and getting issues about it, we need to take steps to define a solid strategy around using Sentry with micro-frontends. The m...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/7622
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Recommended way to use micro-frontends with Sentry JS SDK","articleBody":"After soliciting feedback about [micro-frontends](https://github.com/getsentry/sentry-javascript/discussions/5217) from a variety of users and [getting issues about it](https://github.com/getsentry/sentry-javascript/issues?q=is%3Aopen+is%3Aissue+label%3A%22Feature%3A+Multiple+hubs%2Fclients%22), we need to take steps to define a solid strategy around using Sentry with micro-frontends.\r\n\r\nThe most common thing we heard is that users want to be able to send to different sentry projects from a single web application.\r\n\r\nThere are some things we heard mixed messaging about, that folks were both for and against.\r\n- Isolating breadcrumbs to an individual micro-frontend\r\n- Conditionally requiring different automatic instrumentations based on micro-frontend module\r\n- Exact behavior around performance monitoring with multiple micro-frontends\r\n\r\nIn addition, Browser JavaScript does not provide any async storage mechanism, so there is no way for us to properly isolate data to an set of async function calls.\r\n\r\nBased on this, our recommended solution for micro-frontends is going to be as the following (until we can make larger SDK refactors for more advanced behaviours - requires a new major version):\r\n\r\n1 web application means 1 call to `Sentry.init`, and we will provide an API so that users can make decisions on what events to send to what project. [We made some early attempts at exploring this already](https://github.com/getsentry/sentry-javascript/issues/5185).\r\n\r\n\r\n```js\r\n// Just an example.\r\nSentry.init({\r\n // replays/sessions/transactions all to go MAIN_DSN\r\n dsn: 'MAIN_DSN';\r\n // only works with errors\r\n integrations: [new Multiplexer([\r\n {\r\n dsn: '__DSN_ONE__',\r\n matcher: (event) => event.tags.user === 'VERY IMPORTANT USER';\r\n },\r\n {\r\n dsn: '__DSN_TWO__',\r\n matcher: (event) => GLOBAL_PER_MODULE_TYPE === 'MODULE_TWO';\r\n },\r\n ])];\r\n});\r\n```\r\n\r\nThen in the docs we add a one-pager about our recommended way to use micro-frontends.\r\n\r\nThis way is very opinionated on purpose - let's make sure we have a confident answer to give to users instead of just giving half-measures.","author":{"url":"https://github.com/AbhiPrasad","@type":"Person","name":"AbhiPrasad"},"datePublished":"2023-03-27T13:18:05Z","url":"https://github.com/getsentry/sentry-javascript/issues/7622"}
| 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:3fabc973-2ed4-d38d-a4df-97fa64ceb998 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE94:26A2E8:3B97F3:4FE987:6B049F0E |
| html-safe-nonce | 9238d51b3c5e27715b471d941e9f8b0754c729fcbc733f0989cda7ef77dbe3a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTk0OjI2QTJFODozQjk3RjM6NEZFOTg3OjZCMDQ5RjBFIiwidmlzaXRvcl9pZCI6IjQyMzk5OTg5NjYzMTE0NjA2MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a4027616eb8d1f53691ee23e51ca6d255367ce243629657c247fbf559b2b63d1 |
| hovercard-subject-tag | issue:1642026770 |
| 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/7622/issue_layout |
| twitter:image | https://opengraph.githubassets.com/08a80101bbd3e17a497f631d07e4ece01d236d092ba17881015b38bd1747796f/getsentry/sentry-javascript/issues/7622 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/08a80101bbd3e17a497f631d07e4ece01d236d092ba17881015b38bd1747796f/getsentry/sentry-javascript/issues/7622 |
| og:image:alt | After soliciting feedback about micro-frontends from a variety of users and getting issues about it, we need to take steps to define a solid strategy around using Sentry with micro-frontends. The m... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AbhiPrasad |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d |
| 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 | 3fd14143b75b2af7b76bbd23b069867d091adfcc |
| 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