diff --git a/.changeset/old-teachers-bow.md b/.changeset/old-teachers-bow.md new file mode 100644 index 000000000000..c7eb420a2a18 --- /dev/null +++ b/.changeset/old-teachers-bow.md @@ -0,0 +1,7 @@ +--- +"wrangler": minor +--- + +feat: add sanitised error messages to Wrangler telemetry + +Error messages that have been audited for potential inclusion of personal information, and explicitly opted-in, are now included in Wrangler's telemetry collection. Collected error messages will not include any filepaths, user input or any other potentially private content. diff --git a/packages/wrangler/src/metrics/types.ts b/packages/wrangler/src/metrics/types.ts index 7898d218c81f..caa6d694817a 100644 --- a/packages/wrangler/src/metrics/types.ts +++ b/packages/wrangler/src/metrics/types.ts @@ -125,6 +125,9 @@ export type Events = * Type of error, e.g. UserError, APIError. Does not include stack trace or error message. */ errorType: string | undefined; + /** + * Sanitised error messages that will not include user information like filepaths or stack traces (e.g. `Asset too large`). + */ errorMessage: string | undefined; }; }; diff --git a/packages/wrangler/telemetry.md b/packages/wrangler/telemetry.md index 6bf9fd86ff6c..0c867319748a 100644 --- a/packages/wrangler/telemetry.md +++ b/packages/wrangler/telemetry.md @@ -21,7 +21,7 @@ Telemetry in Wrangler allows us to better identify bugs and gain visibility on u - The format of the Wrangler configuration file (e.g. `toml`, `jsonc`) - Total session duration of the command run (e.g. 3 seconds, etc.) - Whether the Wrangler client is running in CI or in an interactive instance -- Error _type_, if one occurs (e.g. `APIError` or `UserError`) +- Error _type_ (e.g. `APIError` or `UserError`), and sanitised error messages that will not include user information like filepaths or stack traces (e.g. `Asset too large`). - General machine information such as OS and OS Version Cloudflare will receive the IP address associated with your machine and such information is handled in accordance with Cloudflare’s [Privacy Policy](https://www.cloudflare.com/privacypolicy/).