fix: add diagnostic telemetry and user-visible warning for URI handler failures (fixes #655)#723
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds additional telemetry diagnostics and a targeted user-facing warning to improve troubleshooting of VS Code deep-link/URI handling failures.
Changes:
- Record non-sensitive URI metadata (scheme/authority/path/query lengths) into telemetry for debugging.
- Add a
failureStagetelemetry property in the top-level URI handler error path. - Show a warning message when a deep-link is missing the required
connectionStringquery parameter.
- Remove showWarningMessage to avoid double notification (wrapper already shows errors) - Set granular failureStage markers at extractParams/handleRequest boundaries - Remove redundant uriHasQuery and queryFragmentNonEmpty (uriQueryLength covers it)
a9ef122 to
3209d7a
Compare
|
Maintainer note (review-driven changes) On top of the original diagnostics, this branch adds a few review-driven, non-sensitive telemetry properties: A stray emdash was also removed from a code comment. Note for reviewers: |
Summary
The
globalUriHandlertelemetry showed a 100% error rate. The most likely root cause is URIs being opened without aconnectionStringquery parameter, causingextractAndValidateParamsto throw an opaque error with no user-visible feedback.Changes
uriScheme,uriAuthority,uriPathLength,uriQueryLength,uriHasQuery— all non-sensitive, to help identify the actual failure patternqueryFragmentNonEmptytelemetry inextractAndValidateParamsandfailureStagein the catch block to pinpoint which step failsconnectionStringis missing, surfaces a user-visible warning message instead of failing silently with only telemetry:Issue
Fixes #655
Verification
src/vscodeUriHandler.ts, +18 lines)uri.query ?? ''guards against undefined query