yarn package upgrades, ssr update
All checks were successful
deploy to production / deploy (push) Successful in 45s

This commit is contained in:
2023-11-15 07:00:12 +00:00
parent 94ff85fbe1
commit 86e0a17265
326 changed files with 2277 additions and 1839 deletions

View File

@@ -1,5 +1,12 @@
import * as sentry from "./sentry"
import configClient from "../../api/hooks/config-client"
export const apiBaseURL = "/api/"
export const release = configClient.release
console.log("Release: ", release)
export const sentryDSN = "https://5063f9b5564d0fdece4e47a8e2e63672@sentry.basehosts.de/3"
export const sentryTracingOrigins = ["localhost", "project-domain.tld", /^\//]
export const sentryEnvironment: string = "local"
// need to execute early for fetch wrapping
// sentry.init(sentryDSN, sentryTracingOrigins, sentryEnvironment, release)

42
frontend/src/sentry.ts Normal file
View File

@@ -0,0 +1,42 @@
import * as Sentry from "@sentry/svelte"
let initialized = false
export const init = (dsn: string, tracingOrigins: (string | RegExp)[], environment: string, release: string) => {
if (typeof window !== "undefined") {
Sentry.init({
dsn: dsn,
tunnel: "/_s",
integrations: [
new Sentry.BrowserTracing({
tracingOrigins: tracingOrigins,
traceFetch: false,
traceXHR: false,
}),
new Sentry.Replay({
maskAllText: false,
maskAllInputs: false,
blockAllMedia: false,
networkDetailAllowUrls: [/\/api\//],
}),
],
environment: environment,
tracesSampleRate: 1.0,
debug: false,
release: release,
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
})
console.log("Sentry initialized")
initialized = true
}
}
export const currentTransaction = () => Sentry.getCurrentHub().getScope().getTransaction()
export const setUser = (user: Sentry.User) => {
if (typeof window !== "undefined" && initialized) {
user.ip_address = "{{auto}}"
Sentry.setUser(user)
}
}