-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmain.ts
60 lines (50 loc) · 1.45 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Import external packages
import Vue from 'vue';
import VueGtag from 'vue-gtag';
import VueSocialSharing from 'vue-social-sharing';
// @ts-ignore missing definitions
import * as Sentry from '@sentry/vue';
import { CaptureConsole } from '@sentry/integrations';
// Import plugins first (order may matter)
import pinia from '@/plugins/pinia';
import vuetify from '@/plugins/vuetify';
// Import custom behavior
import '@/title';
// Import internal items
import App from '@/App.vue';
import router from '@/router';
Sentry.init({
Vue,
dsn: import.meta.env.VITE_APP_SENTRY_DSN,
environment: import.meta.env.VITE_APP_SENTRY_ENVIRONMENT,
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
}),
new CaptureConsole({
levels: ['error'],
}),
new Sentry.Replay(),
],
tracePropagationTargets: [import.meta.env.VITE_APP_DANDI_API_ROOT || ''],
// Capture 1% of traces for Sentry performance
tracesSampleRate: 0.01,
// Capture extra data about Vue components
trackComponents: true,
// Capture info about Vue component props
attachProps: true,
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});
Vue.use(VueGtag, {
config: { id: 'UA-146135810-2' },
}, router);
Vue.use(VueSocialSharing);
new Vue({
router,
render: (h) => h(App),
pinia,
vuetify,
}).$mount('#app');