Skip to content

Commit

Permalink
Remove non-fatal errors from telemetry (#11339)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored Jun 25, 2024
1 parent 16af927 commit 8fdbf0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .changeset/swift-ladybugs-sniff.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 0 additions & 5 deletions packages/astro/src/vite-plugin-astro-server/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8fdbf0e

Please sign in to comment.