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