From d58f6dd21021b632c6500dd82e4d68093016d484 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Tue, 24 Nov 2020 23:50:59 +0100 Subject: [PATCH] Removed sentry tracing and before events are sent we console.error log them and in dev disable all events. --- src/vinlottis-init.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vinlottis-init.js b/src/vinlottis-init.js index a62db5d..032c9fc 100644 --- a/src/vinlottis-init.js +++ b/src/vinlottis-init.js @@ -5,7 +5,6 @@ import Vinlottis from "@/Vinlottis"; import * as Sentry from "@sentry/browser"; import { Vue as VueIntegration } from "@sentry/integrations"; -import { Integrations } from "@sentry/tracing"; Vue.use(VueRouter); @@ -13,12 +12,15 @@ const ENV = window.location.href.includes("localhost") ? "development" : "produc Sentry.init({ dsn: "https://7debc951f0074fb68d7a76a1e3ace6fa@o364834.ingest.sentry.io/4905091", integrations: [ - new VueIntegration({ - Vue, - tracing: true - }), - new Integrations.BrowserTracing(), - ] + new VueIntegration({ Vue }) + ], + beforeSend: event => { + console.error(event); + if (ENV) { + return null; + } + return event; + } }) // Add global GA variables