VSCode Copilot MetricsOverview 🚀VSCode Copilot Metrics is an extension that tracks usage statistics of GitHub Copilot within your Visual Studio Code environment. It provides insights into completion counts, generated code character counts (via tab key presses), and chat codeblock generation, giving users a clear understanding of their AI-assisted coding productivity. While the extension's name references "Copilot," it remains AI-agnostic for models that offer inlay completions. However, for chat codeblock generation, the extension currently tracks only GitHub Copilot interactions. Status Bar Integration 📊Each workspace maintains its own set of statistics, accessible via the status bar or command palette. The preview panel presents the following key metrics:
Workspace-specific statistics persist even after closing the workspace or editor, ensuring continuity across sessions. Data is stored within the user's home directory, organized by workspace. Quick Access Menu 📋A convenient quick menu, accessible via the status bar item, provides several functionalities:
Exported JSON Structure
Telemetry 📡The extension provides integration with a telemetry server for comprehensive project usage metrics analysis. ConfigurationUsers can configure the following details in their session:
The server address, API key, and username are saved in the global session, while the project name is saved in the workspace session. Customizable EndpointsYou can personalize the following endpoints in the extension settings:
Username and Project Name ConfigurationConfigure the username and project name in two ways:
For remote quickpick, the request should follow this structure:
Remote CollectionOnce configured, metrics are dispatched individually for each accepted suggestion. This facilitates remote collection of fine-grained data, allowing integration into preferred analytics platforms. Telemetry payload structure:
Productivity Formula 📈The extension calculates automated hours, indicating time saved by leveraging the AI model compared to manual coding. Based on an average typing speed of 200 characters per minute, the formula is:
Note: This is a rough estimate; actual time saved may vary based on multiple factors. Requirements 📦No specific prerequisites are necessary. The extension seamlessly integrates with any AI model offering inlay completions within Visual Studio Code. Author 🧑💻Flavio Del Grosso | @flaviodelgrosso |