1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2026-02-04 16:03:10 +00:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Sunwuyuan
ebd6a2785c
Merge pull request #38 from ZeroCatDev/copilot/add-sentry-integration
Add Sentry monitoring with browser tracing and session replay
2026-01-24 08:28:43 +08:00
Sunwuyuan
bd7a42b889
Update tracePropagationTargets and replaysSessionSampleRate 2026-01-24 08:28:19 +08:00
copilot-swe-agent[bot]
890fb147b0 Fix syntax error: remove extra comma in Sentry config
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
2026-01-24 00:19:10 +00:00
copilot-swe-agent[bot]
f9e144b21f Add Sentry integration with browser tracing and replay
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
2026-01-24 00:18:02 +00:00
copilot-swe-agent[bot]
6e8ab0a29d Initial plan 2026-01-24 00:15:05 +00:00
2 changed files with 25 additions and 0 deletions

View File

@ -14,6 +14,7 @@
"@fingerprintjs/fingerprintjs": "^5.0.1", "@fingerprintjs/fingerprintjs": "^5.0.1",
"@mdi/font": "7.4.47", "@mdi/font": "7.4.47",
"@microsoft/clarity": "^1.0.2", "@microsoft/clarity": "^1.0.2",
"@sentry/vue": "^10.36.0",
"@vueuse/core": "^14.1.0", "@vueuse/core": "^14.1.0",
"axios": "^1.13.2", "axios": "^1.13.2",
"idb": "^8.0.3", "idb": "^8.0.3",

View File

@ -7,6 +7,7 @@
// Plugins // Plugins
import {registerPlugins} from '@/plugins' import {registerPlugins} from '@/plugins'
import {createPinia} from 'pinia' import {createPinia} from 'pinia'
import router from './router'
const pinia = createPinia() const pinia = createPinia()
@ -23,8 +24,31 @@ import {createApp} from 'vue'
import messageService from './utils/message'; import messageService from './utils/message';
import { getVisitorId } from './utils/visitorId'; import { getVisitorId } from './utils/visitorId';
import * as Sentry from "@sentry/vue";
const app = createApp(App) const app = createApp(App)
Sentry.init({
app,
dsn: "https://2f8e5e4ec986c6077d3798ba9f683fdd@o4510762489151488.ingest.us.sentry.io/4510762503438336",
// Setting this option to true will send default PII data to Sentry.
// For example, automatic IP address collection on events
sendDefaultPii: true,
integrations: [
Sentry.browserTracingIntegration({ router }),
Sentry.replayIntegration()
],
// Tracing
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/kv-service\.(houlang\.cloud|wuyuan\.dev)/],
// Session Replay
replaysSessionSampleRate: 0.01, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
// Logs
enableLogs: true
});
registerPlugins(app) registerPlugins(app)
//app.use(TDesign) //app.use(TDesign)
app.use(messageService); app.use(messageService);