Error Tracking with single-spa / micro frontends
See original GitHub issueHey folks,
We try to get Datadog RUM working with micro-frontends, where we have multiple micro frontend applications running on one page.
The setup we’ve tried:
- the single HTML file shared by all apps instantiates one BrowserSdk instance with one Datadog application & service
- each mfe application is reflected as a service on Datadog and uploading sourcemaps for its releases and service
- we disabled automated view tracking and instead each mfe app dispatches those manually to override the service attribute
But this does not seem to support multiple services on one page load, because the application stats, bundling all services, would be screwed as one page load emits multiple view events and events descending the view event, like error events, would be linked to the view event last dispatched on that page.
So when one page loads 3 or 4 applications, each reflected as a service on DD, we would only be able to properly monitor one of these. But it seems worse for uncaught, asynchronous errors bubble up to window.onerror
where they would become logged by the connected service, where they however do not fit in and hence create noise.
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:12
Top GitHub Comments
@PaulKujawa thanks for the suggestion, we’ll keep this use case in mind and evaluate possible approaches when we will prioritise this topic.
For reference, Sentry supports automatically fetching sourcemaps. This is our biggest blocker for migrating off of Sentry to Datadog.
https://docs.sentry.io/platforms/javascript/sourcemaps/