0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Remove non-fatal errors from telemetry (#11339)

This commit is contained in:
Matthew Phillips 2024-06-25 12:34:20 -04:00 committed by GitHub
parent 16af927e14
commit 8fdbf0e45b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View file

@ -0,0 +1,7 @@
---
'astro': patch
---
Remove non-fatal errors from telemetry
Previously we tracked non-fatal errors in telemetry to get a good idea of the types of errors that occur in `astro dev`. However this has become noisy over time and results in a lot of data that isn't particularly useful. This removes those non-fatal errors from being tracked.

View file

@ -24,11 +24,6 @@ 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);
// Ignore unhandled rejection errors as they appear A LOT and we cannot record the amount to telemetry
if (errorWithMetadata.name !== AstroErrorData.UnhandledRejection.name) {
telemetry.record(eventError({ cmd: 'dev', err: errorWithMetadata, isFatal: false }));
}
logger.error(null, formatErrorMessage(errorWithMetadata, logger.level() === 'debug'));
return {