Error Tracking with single-spa / micro frontendsSee original GitHub issue
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.
- Created a year ago