-
Notifications
You must be signed in to change notification settings - Fork 256
Open
Description
Hi Team,
In micro frontend (MFE) architectures, several independently deployed MFEs can operate on a single host page. Currently, the @microsoft/applicationinsights-web SDK doesn’t offer a straightforward way to determine which telemetry item comes from which MFE when multiple MFEs use the same Application Insights instance.
Problem
- Telemetry from all MFEs (such as page views, dependencies, custom events, exceptions) is grouped under the same “app,” making it hard to distinguish between sources.
- This complicates filtering, analysis, and correlation of telemetry for each MFE in Azure Application Insights.
- Currently, custom telemetry initializers must be added to each MFE to include properties like
cloudRoleNameormicroFrontendName, which can lead to inconsistencies.
Proposal
Add native SDK support for identifying telemetry items by their micro frontend source.
Potential solutions include:
- Letting each MFE configure a
cloudRoleNameorcomponentNameduring SDK setup, applied to all telemetry from that instance. - Ensuring the
microFrontendNameis included in the telemetry envelope for filtering. - Allowing auto-collected telemetry (page views, dependencies, AJAX calls) to inherit the
microFrontendName.
Benefits
- Easier separation of telemetry for each MFE.
- Simplifies debugging, filtering, and monitoring of MFEs.
- Reduces the need for custom telemetry initializers.
Example Use Case
- A large eCommerce site has MFEs for search, cart, checkout, and profile, all using App Insights SDK on the same page.
- Currently, all telemetry is grouped together.
- Ideally, telemetry from each MFE would be tagged with its name for better isolation of performance and errors.
Looking forward to your feedback on this request.
Metadata
Metadata
Assignees
Labels
No labels