Skip to content

Commit

Permalink
Reduce reporting threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg committed Apr 26, 2024
1 parent b8030ae commit 1aa2e17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/error-reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions test/unit/test-error-reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 1aa2e17

Please sign in to comment.