Multiple Vue Apps

Learn how to use the SDK to instrument multiple Vue 3 apps.

Vue 3 allows you to use multiple apps with the same Sentry SDK instance, as well as add more apps dynamically after the SDK has been already initialized.

Pass all your initially created apps to the app option in Sentry.init:

const appOne = Vue.createApp(App);
const appTwo = Vue.createApp(App);
const appThree = Vue.createApp(App);

  app: [appOne, appTwo, appThree],

If some of your apps are initialized at a later point, you can add Sentry to them like so:

// ...
const myLazyApp = createApp(MiscApp);

myLazyApp.mixin(Sentry.createTracingMixins({ trackComponents: true }));
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").