From d43e7f2c3492b25d242a9ed5260a7428f1a35121 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 29 Aug 2022 16:52:00 +0200 Subject: [PATCH] Debug statistics modules in dev mode Signed-off-by: Thomas Citharel --- js/src/services/statistics/matomo.ts | 1 + js/src/services/statistics/sentry.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/services/statistics/matomo.ts b/js/src/services/statistics/matomo.ts index 7ad1151f..92385376 100644 --- a/js/src/services/statistics/matomo.ts +++ b/js/src/services/statistics/matomo.ts @@ -9,5 +9,6 @@ export const matomo = (environment: any, matomoConfiguration: any) => { environment.app.use(VueMatomo, { ...matomoConfiguration, router: environment.router, + debug: import.meta.env.DEV, }); }; diff --git a/js/src/services/statistics/sentry.ts b/js/src/services/statistics/sentry.ts index 5044446a..7d826bee 100644 --- a/js/src/services/statistics/sentry.ts +++ b/js/src/services/statistics/sentry.ts @@ -12,12 +12,13 @@ export const sentry = (environment: any, sentryConfiguration: any) => { Sentry.init({ app: environment.app, dsn: sentryConfiguration.dsn, + debug: import.meta.env.DEV, integrations: [ new Integrations.BrowserTracing({ routingInstrumentation: Sentry.vueRouterInstrumentation( environment.router ), - tracingOrigins: ["localhost", "mobilizon1.com", /^\//], + tracingOrigins: [window.origin, /^\//], }), ], beforeSend(event) { @@ -33,6 +34,7 @@ export const sentry = (environment: any, sentryConfiguration: any) => { // We recommend adjusting this value in production tracesSampleRate: sentryConfiguration.tracesSampleRate, release: environment.version, + logErrors: true, }); };