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

Remove telemetry for unhandled errors #9571

Merged
merged 2 commits into from
Jan 2, 2024
Merged

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Jan 2, 2024

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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link

changeset-bot bot commented Jan 2, 2024

🦋 Changeset detected

Latest 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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Jan 2, 2024
@@ -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) {
Copy link
Member

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?

Copy link
Contributor

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.

Copy link
Member

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

Copy link
Member

@Princesseuh Princesseuh left a 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

@bluwy
Copy link
Member Author

bluwy commented Jan 2, 2024

I think Fred has the data if we filter the errors by UnhandledRejection, and we can check the kinds of errors we're recording before.

@bluwy bluwy merged commit ec71f03 into main Jan 2, 2024
@bluwy bluwy deleted the remove-unhandled-error-telemetry branch January 2, 2024 15:14
@astrobot-houston astrobot-houston mentioned this pull request Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants