-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Port sentry logic #5570
Port sentry logic #5570
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
20855e1
to
48657f1
Compare
48657f1
to
72ca78f
Compare
…:NomicFoundation/hardhat into features/port-sentry-to-V3
72ca78f
to
7b80e13
Compare
…:NomicFoundation/hardhat into features/port-sentry-to-V3
errorMessage = this.#anonymizeMnemonic(errorMessage); | ||
|
||
// the \\ before path.sep is necessary for this to work on windows | ||
const pathRegex = /\S+[\/\\]\S+/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This is a bit different, it accepts \
or /
in any platform. Previously it used path.sep
.
} | ||
|
||
#isHardhatFile(filename: string): boolean { | ||
const nomicFoundationPath = path.join("node_modules", "@nomicfoundation"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this has also changed
…ures/port-sentry-to-V3
…:NomicFoundation/hardhat into features/port-sentry-to-V3
* (https://develop.sentry.dev/sdk/event-payloads/exception/), return an | ||
* anonymized version of the event. | ||
*/ | ||
public async anonymize(event: any): Promise<either.Either<string, Event>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's replace this with something like:
type AnonymizeResult = {success: true, Event} | {success: false, error:string}
so that we don't add fp-ts
as a dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a small comment about fp-ts
I was able to get Sentry exceptions through on the test environment with manual testing. It did throw up that our anonymizing is not setup for the I think we deal with this issue when we add Sentry to the CLI's uncaught exception handler. |
…on/hardhat into features/port-sentry-to-V3
Done here |
|
||
interface WordMatch { | ||
index: number; | ||
word: string; | ||
} | ||
|
||
type AnonymizeResult = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should export this type as its part of the Anonymizer API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.