getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
8k stars 1.57k forks source link

Detect Micro-Frontends presence in JS apps #8746

Closed smeubank closed 4 months ago

smeubank commented 1 year ago

Problem Statement

Microfrontends are a bit a buzz terms, but there are more concrete definitions of microfrontends which have developed. Specifically with module federations, popularly used with webpack. Today we have no way of detecting if an event is generated from app which is built with/as a "MFE" architecture. And further then the SDK cannot react dynamically during run or build time. Nor could Sentry server side easily detect that event and user might benefit from a different setup.

Solution Brainstorm

Detect if the event is generated in a MFE architecture and if possible what "flavor"

Context should be added to events, which is populated with information about the architecture of the JS application.

AbhiPrasad commented 1 year ago

This is how wappalyzer does it: https://github.com/wappalyzer/wappalyzer/blob/master/src/technologies/m.json#L2370-L2384

They look at injected scripts though, which is hard for the SDK to do. We should figure out if there is a global variable we can look for and see.

getsantry[bot] commented 4 months ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀