From 1aa2e17f5391676b1fc6cc1f1f45ff993637adaf Mon Sep 17 00:00:00 2001 From: Daniel Rozenberg Date: Fri, 26 Apr 2024 14:05:29 -0400 Subject: [PATCH] Reduce reporting threshold --- src/error-reporting.js | 6 +++--- test/unit/test-error-reporting.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/error-reporting.js b/src/error-reporting.js index 6012cd1e3773..268c29dbe4e4 100644 --- a/src/error-reporting.js +++ b/src/error-reporting.js @@ -44,14 +44,14 @@ const ABORTED = 'AbortError'; * them, but we'd still like to report the rough number. * @const {number} */ -const NON_ACTIONABLE_ERROR_THROTTLE_THRESHOLD = 0.001; +const NON_ACTIONABLE_ERROR_THROTTLE_THRESHOLD = 0.0001; /** * The threshold for errors throttled because nothing can be done about * them, but we'd still like to report the rough number. * @const {number} */ -const USER_ERROR_THROTTLE_THRESHOLD = 0.1; +const USER_ERROR_THROTTLE_THRESHOLD = 0.01; /** * The threshold for reporting errors to the beta error reporting endpoint @@ -66,7 +66,7 @@ const REPORT_ERROR_TO_BETA_ENDPOINT_THRESHOLD = 0.1; * be helpful to notify authors. * @const {number} */ -const NON_AMP_JS_ERROR_THRESHOLD = 0.1; +const NON_AMP_JS_ERROR_THRESHOLD = 0.01; /** * Throttles reports for the Stable version. diff --git a/test/unit/test-error-reporting.js b/test/unit/test-error-reporting.js index 7b9e95800995..edfdde9f0e89 100644 --- a/test/unit/test-error-reporting.js +++ b/test/unit/test-error-reporting.js @@ -533,7 +533,7 @@ describes.sandboxed('getErrorReportData', {}, (env) => { }); it('should report throttled load errors at threshold', () => { - nextRandomNumber = 1e-3; + nextRandomNumber = 1e-4; const e = new Error('Failed to load:'); const data = getErrorReportData( undefined, @@ -560,7 +560,7 @@ describes.sandboxed('getErrorReportData', {}, (env) => { }); it('should report throttled Script errors at threshold', () => { - nextRandomNumber = 1e-3; + nextRandomNumber = 1e-4; const e = new Error('Script error.'); const data = getErrorReportData( undefined, @@ -574,7 +574,7 @@ describes.sandboxed('getErrorReportData', {}, (env) => { }); it('should report throttled load errors under threshold', () => { - nextRandomNumber = 1e-3 - 1e-4; + nextRandomNumber = 1e-4 - 1e-5; const e = new Error('Failed to load:'); const data = getErrorReportData( undefined,