You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add failureStage to MANAGER_REGISTRATION_FAILED telemetry for granular error diagnosis (#1405)
## Problem
When `MANAGER_REGISTRATION.FAILED` fires, we only know which manager
failed and the classified error type. We do not know where in the
registration flow the error occurred, such as settings lookup,
persistent state access, path validation, native finder refresh, or
manager registration. That makes telemetry harder to use for diagnosis
and prioritization.
## Changes
This PR adds a `failureStage` property to `MANAGER_REGISTRATION.FAILED`
telemetry so we can identify the exact stage where the error occurred.
- Added `failureStage` to the telemetry event definition and GDPR
mapping.
- Updated `safeRegister()` to read `failureStage` from caught errors and
fall back to `unknown`.
- Added stage tracking in `getPipenv()`, `hasPipenvEnvironments()`,
`getPyenv()`, and `getPoetry()`.
- Added stage tracking in the pipenv, pyenv, poetry, and conda
registration flows.
- Propagated detailed stage information by attaching `failureStage` to
rethrown errors.
## Why this is needed
Manager registration failures currently lack enough detail to determine
which step is failing. Adding stage-level telemetry makes it much easier
to identify whether failures are happening during discovery, state
lookup, file validation, native finder refresh, sourcing setup, or
registration with the API. This should improve investigation speed and
help target fixes more accurately.
## Example values
- `getPipenv:nativeFinderRefresh`
- `getPoetry:validateCachePath`
- `constructCondaSourcingStatus`
- `registerManager`
- `unknown`
## Verification
- Ran `npx tsc --noEmit`
- No compile errors
- Changes are telemetry-only and do not change feature behavior
Co-authored-by: Eleanor Boyd <26030610+eleanorjboyd@users.noreply.github.com>
'The `shell` command is not available by default in Poetry versions 2.0.0 and above. Therefore all shell activation will be handled by calling `source <path-to-activate>`. If you face any problems with shell activation, please file an issue at https://github.com/microsoft/vscode-python-environments/issues to help us improve this implementation.',
28
30
);
31
+
stage='getPoetryVersion';
29
32
constversion=awaitgetPoetryVersion(poetryPath);
30
33
traceInfo(`Poetry found at ${poetryPath}, version: ${version}`);
0 commit comments