map all errors#6389
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances error telemetry by making the MissingToolErrors type public and adding error mapping logic to track which specific tools are missing. When tools fail installation checks, the system can now capture and report the tool names in telemetry with granular error codes.
Key changes:
- Exported
MissingToolErrorstype and its fields to enable external error mapping - Added tracking of tool names in
EnsureInstalledto correlate errors with specific tools - Implemented telemetry error mapping for single and multiple missing tools scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cli/azd/pkg/tools/ensure.go | Exported MissingToolErrors type and fields, added toolsInError tracking to capture tool names when errors occur |
| cli/azd/internal/cmd/errors.go | Added error mapping logic for MissingToolErrors to generate specific telemetry error codes for single/multiple missing tools |
6bf8019 to
041edc6
Compare
041edc6 to
0aaa052
Compare
JeffreyCA
left a comment
There was a problem hiding this comment.
This is great, no more UnknownErrors 😄
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
|
Thanks @weikanglim this should help us more data for UnknownError cases in telemetry. @JeffreyCA lets rollout a patch release today, so we can start to see data coming in cc @kristenwomack @spboyer |
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Update error telemetry to capture actual error types instead of generic "UnknownError" classifications for a better error breakdown.
Changes:
errorType()helper that unwraps errors to find the root causeErrTypetelemetry attribute to explicitly track error typesDeploymentOperationenum to distinguish between deployment, validation, and preview operations with granular error codesMissingToolErrorsto include which tools are missingErrorWithSuggestionandLogInRequiredError