Vue

Add error and span instrumentation to Vue applications. (default)

Import name: Sentry.vueIntegration

This integration is enabled by default. If you'd like to modify your default integrations, read this.

Adds error and span instrumentation for Vue applications.

If the Vue application is not defined from the start, you can add error monitoring for Vue-specific errors later on. To manually add the integration for late-defined Vue applications:

main.js
Copied
import * as Sentry from '@sentry/vue';

Sentry.init({
  dsn: '...',
  // Filter out default `Vue` integration
  integrations: integrations => integrations.filter(integration => integration.name !== 'Vue'),
});

// Sometimes later
const app = createApp({
  template: '<div>hello</div>',
});

Sentry.addIntegration(Sentry.vueIntegration({ app }));
`

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").