Skip to content

Commit df70009

Browse files
Merge pull request #5 from abdullah4tech/main-1
feat: Initialize Sentry for error tracking and performance monitoring.
2 parents dd7fb30 + 2455c56 commit df70009

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/main.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,37 @@ import './assets/main.css'
22

33
import { createApp } from 'vue'
44
import { createPinia } from 'pinia'
5+
import * as Sentry from '@sentry/vue';
56

67
import App from './App.vue'
78
import router from './router'
89

910
const app = createApp(App)
1011

12+
Sentry.init({
13+
app,
14+
dsn: "https://c76145841f23714087313e3c4a4d3be2@o4507877326520320.ingest.us.sentry.io/4507877331107840",
15+
integrations: [
16+
Sentry.browserTracingIntegration({ router }),
17+
Sentry.replayIntegration(),
18+
],
19+
20+
// Set tracesSampleRate to 1.0 to capture 100%
21+
// of transactions for tracing.
22+
// We recommend adjusting this value in production
23+
tracesSampleRate: 1.0,
24+
25+
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
26+
tracePropagationTargets: ["localhost", /^https:\/\/backend-aurh-production\.up\.railway\.app/],
27+
28+
// Capture Replay for 10% of all sessions,
29+
// plus for 100% of sessions with an error
30+
replaysSessionSampleRate: 0.1,
31+
replaysOnErrorSampleRate: 1.0,
32+
});
33+
1134
app.use(createPinia())
1235
app.use(router)
1336

1437
app.mount('#app')
38+

0 commit comments

Comments
 (0)