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

feat: send EDR panics to sentry #6250

Merged
merged 1 commit into from
Feb 10, 2025
Merged

feat: send EDR panics to sentry #6250

merged 1 commit into from
Feb 10, 2025

Conversation

galargh
Copy link
Member

@galargh galargh commented Feb 10, 2025

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

Closes #6218

In this PR, I propose to:

  • enclose each interactions with the internal EDR provider in a try-catch block
  • wrap the unknown errors caught during such interactions in a newly introduced UnknownError which extends ProviderError
  • wrap the unknown errors caught during fetch requests to the HTTP provider in the same UnknownError
  • allow for the UnknownErrors to be reported to sentry

Example report: https://nomic-labs.sentry.io/issues/6286399601/?project=4507685793103872&referrer=project-issue-stream

The alternative we discussed earlier is to search for panic string within the error message and allow for such errors to be reported.

Copy link

changeset-bot bot commented Feb 10, 2025

⚠️ No Changeset found

Latest commit: 72b6e43

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Feb 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 10, 2025 5:48pm

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Feb 10, 2025
@@ -218,7 +225,8 @@ export class HttpProvider extends BaseProvider {
throw new LimitExceededError(undefined, e);
}

throw e;
// eslint-disable-next-line no-restricted-syntax -- allow throwing ProviderError
throw new UnknownError(e.message, e);
Copy link
Member

Choose a reason for hiding this comment

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

This may report every HTTP-related error. We can start with reporting them, but we may need to filter most out later. LGTM though

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking was to err on the side of reporting too much rather than too little.

Copy link
Member

Choose a reason for hiding this comment

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

agreed

Copy link
Member

@alcuadrado alcuadrado left a comment

Choose a reason for hiding this comment

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

LGTM, but can you rename the PR before merging? I think it got an incorrect name by mistake

@galargh galargh changed the title chore: refactor compilation jobs getter feat: send EDR panics to sentry Feb 10, 2025
@galargh galargh added this pull request to the merge queue Feb 10, 2025
Merged via the queue into v-next with commit 71d666f Feb 10, 2025
63 checks passed
@galargh galargh deleted the sentry-edr-errors branch February 10, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants