Skip to content

Error Tracking with single-spa / micro frontends #1777

Open
@PaulKujawa

Description

@PaulKujawa

Hey 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.

This issue relates to #1225 and #1280

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions