flotilla/src/app/tracking.ts

21 lines
516 B
TypeScript
Raw Normal View History

2024-10-25 23:44:06 +00:00
import * as Sentry from "@sentry/browser"
import {getSetting} from "@app/state"
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,
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
},
})
}
}