Skip to content
Snippets Groups Projects
Verified Commit 454a6418 authored by Yoran Hillion's avatar Yoran Hillion
Browse files

:wrench: Adds sentry release to sentry init

parent fa63a67d
Branches
Tags
No related merge requests found
Pipeline #155303 failed with stages
in 11 seconds
import { createApp, markRaw } from 'vue'
import { createPinia } from 'pinia'
import * as Sentry from '@sentry/vue'
import { BrowserTracing } from '@sentry/tracing'
// @ts-ignore external library
import VueMatomo from 'vue-matomo'
......@@ -18,7 +17,6 @@ import IconButton from '@/components/common/IconButton.vue'
import i18n from '@/plugins/i18n'
import router from './router'
import '@vue-unistra/hopla/dist/style.css'
import { lightBrandColors as brand } from '@/assets/style/brandColors'
import { authAxios as authService } from '@/services/authService'
import { layouts } from '@/layouts'
import filters from '@/filters'
......@@ -46,13 +44,14 @@ if (import.meta.env.VITE_APP_SENTRY_TAG) {
Sentry.init({
app,
dsn: 'https://113c189e34e544f495924e19e18924d7@sentry.app.unistra.fr/8',
release: 'SENTRY_RELEASE',
environment: import.meta.env.VITE_APP_SENTRY_TAG,
integrations: [
new BrowserTracing({
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
tracingOrigins: ['localhost', import.meta.env.VITE_APP_FRONT_URL, /^\//],
}),
new Sentry.Replay(),
],
})
}
......@@ -72,9 +71,6 @@ app.use(pinia)
app.use(router)
//@ts-ignore
app.use(Quasar, {
//config: {
// brand,
//},
iconSet: quasarIconSet,
plugins: {
Notify
......
/// <reference types="vitest" />
import { fileURLToPath, URL } from 'node:url'
import { execSync } from 'node:child_process'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { quasar, transformAssetUrls } from '@quasar/vite-plugin'
import type { UserConfigExport } from 'vitest/dist/config'
// https://vitejs.dev/config/
export default defineConfig({
const config: UserConfigExport = {
plugins: [
vue({
template: { transformAssetUrls },
......@@ -41,4 +42,11 @@ export default defineConfig({
build: {
sourcemap: true,
},
}
export default defineConfig(({ command }) => {
if (command === 'serve') return config
else config.define = {
'SENTRY_RELEASE': execSync('git describe --always')
}
return config
})
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment