-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Remove telemetry for unhandled errors #9571
Conversation
🦋 Changeset detectedLatest commit: d112bde The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -24,7 +24,10 @@ export function recordServerError( | |||
// Our error should already be complete, but let's try to add a bit more through some guesswork | |||
const errorWithMetadata = collectErrorMetadata(err, config.root); | |||
|
|||
telemetry.record(eventError({ cmd: 'dev', err: errorWithMetadata, isFatal: false })); | |||
// Ignore unhandled rejection errors as they appear A LOT and we cannot record the amount to telemetry | |||
if (errorWithMetadata.name !== AstroErrorData.UnhandledRejection.name) { |
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 don't remember, do we need to be defensive against the error not having a name here?
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.
If it doesn't have a name it should follow through to telemetry, shouldn't it? We would only need to be defensive if the error was null or undefined, which seems unlikely.
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.
Oh yeah, for sure. I was just wondering if it can be undefined
at all there or not
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.
Just one comment, jsut wondering about it., but looks fine to me otherwise. Would love to figure out what issues people were hitting though, but we don't have much info to go on from, unfortunately
I think Fred has the data if we filter the errors by |
Changes
The telemetry for unhandled errors are a LOT, so removing them for now. I didn't uncomment it out as I don't quite see another way we could enable it in the future.
Testing
It's a one-line removal, so should still work like before.
Docs
n/a. not docs related.