Files
flotilla/src/app/util/tracking.ts
T
2025-10-21 08:27:30 -07:00

24 lines
571 B
TypeScript

import {noop} from "@welshman/lib"
import * as Sentry from "@sentry/browser"
import {getSetting} from "@app/core/state"
export const setupTracking = () => {
if (import.meta.env.VITE_GLITCHTIP_API_KEY) {
Sentry.init({
dsn: import.meta.env.VITE_GLITCHTIP_API_KEY,
beforeSend(event: any) {
if (!getSetting("report_errors")) {
return null
}
return event
},
integrations(integrations) {
return integrations.filter(integration => integration.name !== "Breadcrumbs")
},
})
}
return noop
}