mirror of
https://github.com/danbulant/Mangades
synced 2026-07-06 03:20:42 +00:00
remove broken tracing
This commit is contained in:
parent
b79647df02
commit
ade3a59495
3 changed files with 23 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import * as Sentry from "@sentry/browser";
|
import * as Sentry from "@sentry/browser";
|
||||||
import { apm } from "./tracing";
|
// import { apm } from "./tracing";
|
||||||
|
|
||||||
var isLogedInCache: boolean | null = null;
|
var isLogedInCache: boolean | null = null;
|
||||||
var isLogedInCacheTime: number | null = null;
|
var isLogedInCacheTime: number | null = null;
|
||||||
|
|
@ -23,7 +23,7 @@ export function getUserID() {
|
||||||
const token = localStorage.getItem("token")!;
|
const token = localStorage.getItem("token")!;
|
||||||
let data = JSON.parse(atob(token.substring(token.indexOf(".") + 1, token.lastIndexOf("."))));
|
let data = JSON.parse(atob(token.substring(token.indexOf(".") + 1, token.lastIndexOf("."))));
|
||||||
Sentry.setUser({ id: data.sub });
|
Sentry.setUser({ id: data.sub });
|
||||||
apm.setUserContext({ id: data.sub });
|
// apm.setUserContext({ id: data.sub });
|
||||||
return data.sub;
|
return data.sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
import { browser } from '$app/environment';
|
// import { browser } from '$app/environment';
|
||||||
import { ApmBase, init as initApm } from '@elastic/apm-rum'
|
// import { ApmBase, init as initApm } from '@elastic/apm-rum'
|
||||||
|
|
||||||
var apm_: ApmBase;
|
// var apm_: ApmBase;
|
||||||
|
|
||||||
if(browser) {
|
// if(browser) {
|
||||||
apm_ = initApm({
|
// apm_ = initApm({
|
||||||
// Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
|
// // Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
|
||||||
serviceName: 'mangades',
|
// serviceName: 'mangades',
|
||||||
|
|
||||||
// Set custom APM Server URL (default: http://localhost:8200)
|
// // Set custom APM Server URL (default: http://localhost:8200)
|
||||||
serverUrl: 'https://apm.elasticsearch.danbulant.cloud',
|
// serverUrl: 'https://apm.elasticsearch.danbulant.cloud',
|
||||||
|
|
||||||
// Set the service version (required for source map feature)
|
// // Set the service version (required for source map feature)
|
||||||
serviceVersion: import.meta.env.VITE_SENTRY_RELEASE,
|
// serviceVersion: import.meta.env.VITE_SENTRY_RELEASE,
|
||||||
|
|
||||||
// Set the service environment
|
// // Set the service environment
|
||||||
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT || 'production'
|
// environment: import.meta.env.VITE_SENTRY_ENVIRONMENT || 'production'
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
export const apm = apm_;
|
// export const apm = apm_;
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
import * as Sentry from '@sentry/svelte';
|
import * as Sentry from '@sentry/svelte';
|
||||||
import { BrowserTracing } from "@sentry/tracing";
|
import { BrowserTracing } from "@sentry/tracing";
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
import { apm } from "$lib/util/tracing";
|
// import { apm } from "$lib/util/tracing";
|
||||||
import { page } from "$app/stores";
|
// import { page } from "$app/stores";
|
||||||
|
|
||||||
export var data;
|
export var data;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
@ -27,9 +27,9 @@
|
||||||
autoSessionTracking: false
|
autoSessionTracking: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(browser) {
|
// if(browser) {
|
||||||
apm.setInitialPageLoadName($page.route.id);
|
// apm.setInitialPageLoadName($page.route.id);
|
||||||
}
|
// }
|
||||||
|
|
||||||
let skipFirst = true;
|
let skipFirst = true;
|
||||||
let last = typeof window !== "undefined" && window.location.pathname;
|
let last = typeof window !== "undefined" && window.location.pathname;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue