-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/vue
SDK Version
^7.107.0
Framework Version
vue:2.6.12 (HOST APP) , vue:3.2.45 (REMOTE APP)
Link to Sentry event
No response
Reproduction Example/SDK Setup
I am unable to get sentry work with the Module federation setup following this document https://docs.sentry.io/platforms/javascript/best-practices/micro-frontends/#automatically-route-errors-to-different-projects-depending-on-module
Things to Note
- the setup works when tested from the local in DEV mode
- But then BUILT for STAGING or PRODUCTION and DEPLOYED. It is not working in those env.
- I have tested there are no filters or related config is passed.
Detailed Notes
- Our use-case is, we load vue3 apps(REMOTE Apps, with no sentry setup.) into vue2(HOST APP, with Sentry.init()) with the module federation of webpack. Which is already pushed to the prod couple of quarters back.
- Now, we want to set up individual "projects" for each of these REMOTE federated applications to assign the errors to the correct team using https://docs.sentry.io/platforms/javascript/best-practices/micro-frontends/. Which is a blocker (Issue -2)
- In the process of debugging, We have observed that, if an error logged on the HOST App, it reaches sentry. But an error logged from the REMOTE app Sentry logs are missing and we have seen no api calls from sentry for such errors. So we can assume, they are not reaching sentry in the PROD environment. (Issue -1, may be the underlying cause)
- This is not working even with "global" or "window" error handlers (Like window.onerror or window.addEventListener('unhandledrejection') nor "sentry.captureError" . So nothing is able to capture the error triggered on the REMOTE(federated apps) when they are deployed to Prod.
Steps to Reproduce
- Setup a VUE2 HOST APP
- Load any VUE3 remote app into it with help of module federation with webpack, by following https://docs.sentry.io/platforms/javascript/best-practices/micro-frontends/#automatically-route-errors-to-different-projects-depending-on-module
- Build it and push the code / run in local.
- try to trigger any error on the REMOTE APP and you see it wont be reaching to sentry
Expected Result
- As per the docs, sentry on the HOST App should redirect the errors to the right project using the DSN returned from the transporter.
Actual Result
you see no errors are reaching to sentry
Metadata
Metadata
Assignees
Labels
Projects
Status
Waiting for: Community