From 16c99d054e2d08cea423ef53aa885a00f2d10d33 Mon Sep 17 00:00:00 2001 From: Petr Vecera Date: Sun, 25 Feb 2024 19:37:04 +0100 Subject: [PATCH] Add sentry config --- src/main.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main.tsx b/src/main.tsx index 5363e18..466d079 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -14,11 +14,18 @@ info("Start frontend") Sentry.init({ dsn: "https://88e8a309f91b8b5bb9a41dd14ff775b9@o4504995920543744.ingest.sentry.io/4506752563019776", integrations: [Sentry.browserTracingIntegration()], - // Performance Monitoring - tracesSampleRate: 0.1, // Capture 100% of the transactions - // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled + tracesSampleRate: 0.1, tracePropagationTargets: ["localhost"], -}) + beforeSend(event, hint) { + // On macOS we do only development, we can ignore all development errors + if (event.contexts?.os?.name === 'macOS') { + // Ignore the event + return null; + } + // Otherwise, return the event as is + return event; + }, +}); events.init()