import Sentry from './sentry'; import { Integrations } from '@sentry/tracing'; import { environment } from './environment'; import { version } from '../../package.json'; export const createSentryPlugin = (router: any) => ({ install(app: any) { Sentry.init({ app, dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0', integrations: [ new Integrations.BrowserTracing({ routingInstrumentation: Sentry.vueRouterInstrumentation(router), tracingOrigins: ['localhost', 'my-site-url.com', /^\//], }), ], // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, release: version, environment, debug: environment !== 'production', }); }, });