Changed javascipt exception tracker method..

This commit is contained in:
Cüneyt Şentürk
2022-11-21 16:26:13 +03:00
parent 8602a1f478
commit 1c93c7a11e
14 changed files with 263 additions and 79 deletions

View File

@ -0,0 +1 @@
// Will added as soon as possible

View File

@ -0,0 +1,34 @@
import * as Sentry from "@sentry/vue";
import { BrowserTracing } from "@sentry/tracing";
export default {
install(Vue) {
alert(exception_tracker.params.traces_sample_rate);
Sentry.init({
Vue,
dsn: exception_tracker.action,
logErrors: true,
integrations: [
new BrowserTracing({
tracingOrigins: [],
}),
],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: exception_tracker.params.traces_sample_rate,
});
Sentry.setUser({
id: exception_tracker.user.id,
username: exception_tracker.user.name,
email: exception_tracker.user.email,
ip_address: exception_tracker.ip,
});
for (const [key, value] of Object.entries(exception_tracker.tags)) {
Sentry.setTag(key, value);
}
}
}