build(custom): 调整监控
This commit is contained in:
@@ -15,8 +15,8 @@
|
|||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,vue}": [
|
"*.{js,vue}": [
|
||||||
"eslint --ext .js,.vue .",
|
"npx prettier --write --end-of-line lf .",
|
||||||
"npx prettier --write --end-of-line lf ."
|
"eslint --ext .js,.vue ."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ export const router = createRouter({
|
|||||||
export async function setupRouter(app) {
|
export async function setupRouter(app) {
|
||||||
await addDynamicRoutes()
|
await addDynamicRoutes()
|
||||||
setupRouterGuard(router)
|
setupRouterGuard(router)
|
||||||
|
// if (import.meta.env.VITE_SENTRY) {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
app,
|
app,
|
||||||
dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6',
|
dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6',
|
||||||
integrations: [
|
integrations: [
|
||||||
new Sentry.BrowserTracing({
|
new Sentry.BrowserTracing({
|
||||||
tracePropagationTargets: ['localhost'],
|
tracePropagationTargets: ['localhost', /^https:\/\/w\.huakk\.top\/api/],
|
||||||
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
|
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
|
||||||
}),
|
}),
|
||||||
new Sentry.Replay(),
|
new Sentry.Replay(),
|
||||||
@@ -29,6 +30,7 @@ export async function setupRouter(app) {
|
|||||||
replaysSessionSampleRate: 0.1,
|
replaysSessionSampleRate: 0.1,
|
||||||
replaysOnErrorSampleRate: 1.0,
|
replaysOnErrorSampleRate: 1.0,
|
||||||
})
|
})
|
||||||
|
// }
|
||||||
app.use(router)
|
app.use(router)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user