-
Couldn't load subscription status.
- Fork 1.3k
Write telemetry about context provider stats #1672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 adds telemetry tracking for context provider statistics in inline completions. The changes enable detailed monitoring of how context providers are used and resolved during code completion requests.
Key changes:
- Added
idfields to context items (SnippetContext, TraitContext, CodeSnippet, Trait) for tracking usage statistics - Implemented telemetry event emission for context provider completion statistics
- Added
debugPathfield to RunnableResult for improved debugging capabilities
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/languageServer/common/languageContextService.ts | Added optional id field to SnippetContext and TraitContext interfaces |
| src/platform/inlineCompletions/common/api.ts | Added optional id field to CodeSnippet interface |
| src/extension/typescriptContext/vscode-node/types.ts | Added debugPath field to ResolvedRunnableResult and propagated through conversion |
| src/extension/typescriptContext/vscode-node/languageContextService.ts | Populated id field when converting context items |
| src/extension/typescriptContext/vscode-node/inspector.ts | Added display of debugPath in tree view |
| src/extension/typescriptContext/serverPlugin/src/common/protocol.ts | Added debugPath field to ContextRunnableResult |
| src/extension/typescriptContext/serverPlugin/src/common/contextProvider.ts | Added debugPath property to RunnableResult class |
| src/extension/typescriptContext/serverPlugin/src/common/baseContextProviders.ts | Implemented getDebugPath method and refactored ID computation |
| src/extension/typescriptContext/common/serverProtocol.ts | Added debugPath field to ContextRunnableResult (duplicates protocol.ts) |
| src/extension/completions-core/vscode-node/lib/src/prompt/contextProviderStatistics.ts | Added opportunityId tracking and method to retrieve all usage statistics |
| src/extension/completions-core/vscode-node/lib/src/prompt/contextProviderRegistry.ts | Set opportunityId and refactored statistics resolution tracking |
| src/extension/completions-core/vscode-node/lib/src/ghostText/ghostText.ts | Added telemetry emission for context provider completion statistics |
| src/extension/completions-core/vscode-node/bridge/src/completionsTelemetryServiceBridge.ts | Added getTelemetryService method for direct access |
No description provided.