@sentry/vue
TypeScript icon, indicating that this package has built-in type declarations

7.112.2 • Public • Published

Sentry

Official Sentry SDK for Vue.js

Links

General

This package is a wrapper around @sentry/browser, with added functionality related to Vue.js. All methods available in @sentry/browser can be imported from @sentry/vue.

To use this SDK, call Sentry.init(options) as early in your application as possible.

Vue 3

const app = createApp({
  // ...
});

Sentry.init({
  app,
  dsn: '__PUBLIC_DSN__',
   integrations: [
    // Or omit `router` if you're not using vue-router
    Sentry.browserTracingIntegration({ router }),
  ],
});

Vue 2

import Vue from 'vue'
import App from './App'
import router from './router'
import * as Sentry from '@sentry/vue'

Sentry.init({
  Vue: Vue,
  dsn: '__PUBLIC_DSN__',
  integrations: [
    // Or omit `router` if you're not using vue-router
    Sentry.browserTracingIntegration({ router }),
  ],
});

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
});

/@sentry/vue/

    Package Sidebar

    Install

    npm i @sentry/vue

    Weekly Downloads

    502,069

    Version

    7.112.2

    License

    MIT

    Unpacked Size

    151 kB

    Total Files

    76

    Last publish

    Collaborators

    • benvinegar
    • billyvg
    • mitsuhiko
    • haza
    • jauer
    • sentry-bot
    • evanpurkhiser
    • lynnagara
    • leedongwei
    • markstory
    • zeeg