Skip to content
This repository has been archived by the owner on Jul 17, 2021. It is now read-only.

tjk/sentry-vue3

Repository files navigation

@tjk/sentry-vue3

DO NOT USE THIS! OFFICIAL VERSION OUT: getsentry/sentry-javascript#2925 (comment)


EXPERIMENTAL: Use at own risk!

Possible issues:

  • internal API used may completely break / be wrong
  • "Didn't apply tracing hooks" logging now but it looked like it worked when i first tested
  • is it bad to start pageload transaction only once await router.isReady()? wrong route otherwise

getsentry/sentry-javascript#2925

Based off of @sentry/vue + code from https://github.com/vuejs/devtools

To install:

yarn add @tjk/sentry-vue3

To use:

import { createApp } from 'vue'
import { createRouter } from 'vue-router'
import * as Sentry from '@tjk/sentry-vue3'
import RootComponent from './root.vue'

const app = new createApp(RootComponent)
const router = createRouter()

Sentry.init({
  dsn: SENTRY_DSN,
  release: SENTRY_RELEASE,
  environment: NODE_ENV,
  app,
  tracingOptions: {
    trackComponents: true,
  },
  debug: NODE_ENV === "development",
  logErrors: NODE_ENV === "development",
  integrations: [
    new Integrations.BrowserTracing({
      routingInstrumentation: Sentry.vueRouterInstrumentation(router),
    }),
  ],
  tracesSampleRate: 1.0,
})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published