Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete: do not report some network errors to Sentry #1029

Merged
merged 8 commits into from
Sep 13, 2023

Conversation

valerybugakov
Copy link
Member

Context

  • This PR makes our error reporting rules more strict on top of Autocomplete: do not report auth errors to Sentry #1028 by omitting network errors with a network status >= 500. The assumption is that these errors are already monitored on the backend.
  • Filtering logic is moved right into the Sentry's beforeSend hook to ensure we do not accidentally report these types of errors from another captureException call site.
  • A separate NetworkError class is added in addition to the TracedError to distinguish between transport-level and application logic errors.
  • Disabled Sentry error reporting for non-production environments + introduced an environment variable to enable it for local debugging.
  • Addresses the third most reported Sentry error read ECONNRESET (292k events). It should help us to keep the volume of reported errors under control.

Test plan

Tested locally.

@valerybugakov valerybugakov requested a review from a team September 13, 2023 03:35
@valerybugakov valerybugakov self-assigned this Sep 13, 2023
Copy link
Contributor

@dominiccooney dominiccooney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but again we don't need to touch proto, the constructor already does that.

lib/shared/src/sourcegraph-api/errors.ts Outdated Show resolved Hide resolved
Base automatically changed from vb/auth-errors to main September 13, 2023 04:09
@valerybugakov valerybugakov merged commit 460406b into main Sep 13, 2023
10 checks passed
@valerybugakov valerybugakov deleted the vb/network-errors branch September 13, 2023 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants