Issue
I set up Sentry for micro frontends using the Micro Frontends guide. Errors route to the right projects, but performance metrics and spans only show on the core (host) project. I want to know whether I can route spans the same way I route errors.
Applies To
All SaaS Customers and Self-Hosted Users
JavaScript SDK
Micro frontends
Tracing
makeMultiplexedTransport/moduleMetadataIntegration
Resolution
You can enable Tracing for a micro frontend app. Init Sentry once in the host (core) application and keep performance instrumentation there. Page-level metrics such as Web Vitals belong on that host project.
What is not supported is automatically routing spans or transactions to separate micro frontend projects the same way errors are routed with moduleMetadata and makeMultiplexedTransport. Error routing relies on stack frames and injected module metadata. Many performance spans (for example HTTP requests) do not have that stack context, so the SDK cannot attribute them to a child micro frontend the same way.
Recommended setup:
Call
Sentry.initonly in the host app (never more than once).Enable Tracing in that host init (for example
browserTracingIntegrationand atracesSampleRate).Use the micro frontends guide to route errors to per-MFE projects.
Keep performance data on the core/host project.
Do not init separate Tracing clients in each micro frontend for the same page. That splits the view and is not the recommended pattern.
Optional: if you need a manual hint on which micro frontend started a span, you can set a tag in a local scope around the work (for example with Sentry.withScope) and copy that tag onto new spans from a host spanStart hook. This is custom instrumentation, not automatic routing like errors, and it does not send each micro frontend’s spans to a separate project by itself.
See the Micro Frontends guide for error routing and SDK version alignment.
