Skip to content

Commit 88cc4ca

Browse files
authored
Reduce Sentry sample rate to 0.1%
1 parent 0e3c2ba commit 88cc4ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dotcom-rendering/src/client/sentryLoader/sentryLoader.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ const isSentryEnabled = ({
2424
if (isInBrowserVariantTest) return true;
2525
// Sentry lets you configure sampleRate to reduce the volume of events sent
2626
// but this filter only happens _after_ the library is loaded. The Guardian
27-
// measures page views in the billions so we only want to log 1% of errors that
27+
// measures page views in the billions so we only want to log 0.1% of errors that
2828
// happen but if we used sampleRate to do this we'd be needlessly downloading
29-
// Sentry 99% of the time. So instead we just do some math here and use that
29+
// Sentry 99.9% of the time. So instead we just do some math here and use that
3030
// to prevent the Sentry script from ever loading.
31-
if (random <= 99 / 100) return false;
31+
if (random <= 999 / 1000) return false;
3232
return true;
3333
};
3434

0 commit comments

Comments
 (0)