mirror of
https://github.com/danbulant/Mangades
synced 2026-06-17 13:21:03 +00:00
add browser tracing
This commit is contained in:
parent
c5e97d675b
commit
984e3bf7ec
3 changed files with 8 additions and 2 deletions
|
|
@ -28,6 +28,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@sentry/browser": "^7.25.0",
|
||||
"@sentry/tracing": "^7.25.0",
|
||||
"fflate": "^0.6.10",
|
||||
"streamsaver": "^2.0.6",
|
||||
"svelte-local-storage-store": "^0.3.1",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Toucan } from "toucan-js";
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import { BrowserTracing } from "@sentry/tracing";
|
||||
|
||||
/** @type {import('./$types').PageLoad} */
|
||||
export function load({ url, event }) {
|
||||
|
|
@ -39,7 +40,11 @@ export function load({ url, event }) {
|
|||
// @ts-ignore
|
||||
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT,
|
||||
// @ts-ignore
|
||||
release: import.meta.env.VITE_SENTRY_RELEASE
|
||||
release: import.meta.env.VITE_SENTRY_RELEASE,
|
||||
integrations: [
|
||||
new BrowserTracing(),
|
||||
],
|
||||
tracesSampleRate: 1
|
||||
});
|
||||
|
||||
sentry.isInitalized = true;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export async function GET({ url }) {
|
|||
...ret.headers,
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, HEAD, OPTIONS',
|
||||
'Access-Control-Allow-Headers': 'Content-Type, Accept, X-Requested-With',
|
||||
'Access-Control-Allow-Headers': 'Content-Type, Accept, X-Requested-With, sentry-trace, baggage',
|
||||
'Access-Control-Max-Age': '86400',
|
||||
|
||||
'Content-Type': ret.headers.get('Content-Type')!,
|
||||
|
|
|
|||
Loading…
Reference in a new issue