2024-10-25 23:44:06 +00:00
|
|
|
import * as Sentry from "@sentry/browser"
|
2025-03-03 23:09:58 +00:00
|
|
|
import {getSetting} from "@app/state"
|
2024-10-25 21:36:33 +00:00
|
|
|
|
|
|
|
|
export const setupTracking = () => {
|
2024-10-30 21:33:25 +00:00
|
|
|
if (import.meta.env.VITE_GLITCHTIP_API_KEY) {
|
2024-10-25 23:44:06 +00:00
|
|
|
Sentry.init({
|
2024-10-30 21:33:25 +00:00
|
|
|
dsn: import.meta.env.VITE_GLITCHTIP_API_KEY,
|
2025-03-03 23:09:58 +00:00
|
|
|
beforeSend(event: any) {
|
|
|
|
|
if (!getSetting("report_errors")) {
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return event
|
|
|
|
|
},
|
2024-10-25 23:44:06 +00:00
|
|
|
integrations(integrations) {
|
2024-10-31 19:24:40 +00:00
|
|
|
return integrations.filter(integration => integration.name !== "Breadcrumbs")
|
2024-10-25 23:44:06 +00:00
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-10-25 21:36:33 +00:00
|
|
|
}
|