Skip to content

feat: enhance telemetry with error classification and duration tracking for environment manager registration#1292

Open
eleanorjboyd wants to merge 6 commits intomicrosoft:mainfrom
eleanorjboyd:gothic-vicuna
Open

feat: enhance telemetry with error classification and duration tracking for environment manager registration#1292
eleanorjboyd wants to merge 6 commits intomicrosoft:mainfrom
eleanorjboyd:gothic-vicuna

Conversation

@eleanorjboyd
Copy link
Member

help identify what could be causing discovery errors and which managers may be taking a while to load

@eleanorjboyd eleanorjboyd self-assigned this Feb 27, 2026
@eleanorjboyd eleanorjboyd added the feature-request Request for new features or functionality label Feb 27, 2026
@eleanorjboyd eleanorjboyd requested a review from Copilot February 27, 2026 16:22
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 27, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances telemetry tracking for environment manager operations by introducing structured error classification and duration metrics. The changes help identify specific error types (spawn failures, timeouts, permission issues, etc.) and measure performance for environment discovery and manager registration.

Changes:

  • Added a new error classification module (errorClassifier.ts) that categorizes errors into telemetry-safe types
  • Updated environment discovery telemetry to use classified error types instead of raw error names
  • Added duration tracking to environment manager registration via StopWatch
  • Added error telemetry for extension manager registration failures in extension.ts

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/common/telemetry/errorClassifier.ts New module providing classifyError() function that maps errors to structured types (spawn_timeout, spawn_enoent, permission_denied, canceled, parse_error, unknown)
src/internal.api.ts Updated ENVIRONMENT_DISCOVERY telemetry to use classifyError() for more granular error categorization
src/features/envManagers.ts Added StopWatch to track and report duration for environment manager registration
src/extension.ts Added error telemetry in catch block for manager registration failures
src/common/telemetry/constants.ts Updated GDPR annotations to include duration measurement for ENVIRONMENT_MANAGER_REGISTERED event

aeschli
aeschli previously approved these changes Feb 27, 2026
@eleanorjboyd eleanorjboyd enabled auto-merge (squash) February 27, 2026 19:18
aeschli
aeschli previously approved these changes Feb 27, 2026
# Conflicts:
#	src/extension.ts
#	src/internal.api.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-request Request for new features or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants