Skip to content

Add telemetry for manager registration failures#1365

Merged
StellaHuang95 merged 9 commits intomicrosoft:mainfrom
StellaHuang95:telemetry
Mar 18, 2026
Merged

Add telemetry for manager registration failures#1365
StellaHuang95 merged 9 commits intomicrosoft:mainfrom
StellaHuang95:telemetry

Conversation

@StellaHuang95
Copy link
Contributor

Adds telemetry to diagnose why environments sometimes fail to appear for users. Currently we do not know what went wrong or what's missing.

New telemetry events

  • MANAGER_REGISTRATION.FAILED — Fires when a manager throws an unexpected error during registration. Tells us which managers fail and the classified error type.

  • MANAGER_REGISTRATION.SKIPPED — Fires when a manager's tool (conda/pyenv/pipenv/poetry) wasn't found on the system. Tells us which managers are commonly unavailable, helping us understand user environments. Without SKIPPED, we'd only see that a manager didn't register. We couldn't tell whether that's because the user doesn't use conda (fine, nothing to fix) or because conda is installed but our code crashed trying to register it (bug).

  • SETUP.HANG_DETECTED — Fires when the entire setup block hasn't completed within 120s. Tells us which stage was in progress when the hang occurred (nativeFinder, managerRegistration, envSelection, etc.).

Enhanced existing event

  • EXTENSION_MANAGER_REGISTRATION_DURATION now includes result (success/error), failureStage, and errorType — previously it only reported duration.

Non-telemetry changes

  • Conda registration refactor: Separated the "conda not found" path (try/catch on getConda) from the registration path, so SKIPPED vs FAILED telemetry is accurate. Post-getConda errors still call notifyMissingManagerIfDefault and re-throw for safeRegister to handle.
  • safeRegister in asyncUtils.ts: Now sends MANAGER_REGISTRATION.FAILED telemetry when a manager's promise rejects, so failures are captured even when individual managers don't add their own telemetry.

@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 18, 2026
@StellaHuang95 StellaHuang95 merged commit f4021ca into microsoft:main Mar 18, 2026
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants