Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
wip setting up sentry
  • Loading branch information
khaledosman committed Mar 12, 2025
commit 45d0ba8d3cbbabe369a380ed394049638f952549
98 changes: 98 additions & 0 deletions lumigator/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lumigator/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"dependencies": {
"@primevue/themes": "^4.2.5",
"@sentry/vue": "^9.5.0",
"axios": "^1.7.9",
"papaparse": "^5.5.2",
"pinia": "^3.0.1",
Expand Down
33 changes: 32 additions & 1 deletion lumigator/frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import PrimeVue from 'primevue/config'
import ConfirmationService from 'primevue/confirmationservice'
import ToastService from 'primevue/toastservice'
import { LumiPreset } from './primevue.config'

import { init, browserTracingIntegration, replayIntegration} from '@sentry/vue'
const app = createApp(App)

app
Expand All @@ -28,4 +28,35 @@ app
.use(ToastService)
.directive('tooltip', Tooltip)

init({
app,
dsn: import.meta.env.VITE_APP_LUMIGATOR_SENTRY_DSN,
integrations: [
browserTracingIntegration({ router }),
replayIntegration(),
],
beforeSend(event) {
console.log(event)
// Modify or drop the event here
if (event.user) {
// Don't send user's email address
delete event.user.email;
return event;
} else {
// drop the event
return null;
}
},
// Tracing
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
// Session Replay
replaysSessionSampleRate: 0.1, // 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.
});

app.mount('#app')
setTimeout(() => {
throw new Error('test')
}, 2000)
Loading