question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error Tracking with single-spa / micro frontends

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:12

github_iconTop GitHub Comments

2reactions
bcaudancommented, Nov 8, 2022

@PaulKujawa thanks for the suggestion, we’ll keep this use case in mind and evaluate possible approaches when we will prioritise this topic.

1reaction
7E6D4309-D2A9-4155-9D4F-287B8CDA14C1commented, Nov 2, 2022

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/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Single SPA - Handle error in nested micro front end
MFE = micro-front-end. I'm trying to import 1 MFE to another MFE. MFE-food calls MFE-cart. When MFE-cart is down, there is an impact...
Read more >
Creating micro-frontend apps with single-spa
Smart error tracking lets you triage and categorize issues, then learns from this. Get notified of impactful user issues, not false positives.
Read more >
Sometimes some micro front end is not loaded properly in ...
Sometimes some micro front end is not loaded properly in single spa framework In my main index.html file, I had given following kind...
Read more >
Micro frontends: Cross-application communication with Single ...
In this one, we are going to organize micro frontend interaction (component communication) with the RxJs.
Read more >
diwala/logger
Note: In micro-frontend architecture, error logging should be managed inside each app separately ... So in the entry file of the single-spa react...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found