Copilot Logger
This lightweight extension tracks GitHub Copilot completions and chat sessions, aggregates metrics, and saves them locally as structured JSON for further private analysis and reporting.
Note: This extension only collects and stores raw metrics data. Analysis and reporting are not included and must be set up separately by the user.
Fully local data collection with no telemetry or data transmission outside the user's machine.
Key Features
- Local tracking of GitHub Copilot completions and chat activity
- Automatic background collection every 60 minutes
- Structured JSON metrics for usage reporting
- Configurable data storage location
- No external servers, no uploads, no dependency on network access
Designed for organizations requiring strict privacy, compliance, or offline workflows.
Installation & Setup
- Install the extension from Visual Studio Marketplace
- Restart Visual Studio
- On first launch, you'll be prompted to provide:
- Your Name: Same as your corporate email address without domain (e.g., "john.doe" from john.doe@company.com)
- Team/Project Name: Your team or project name
- Customer Name: The customer/client name you're working for
Configuration is saved and can be updated by editing: %AppData%\CopilotLogCollector\userconfig.txt
Data Storage
Default folder location: Desktop\copilot-vs-log\metrics\
Example (metrics_YYYY-MM-DD.json):
{
"date": "2025-10-08",
"source": "copilot",
"action": "completion",
"servedBy": "gpt-5",
"numRequests": 3,
"name": "John Doe",
"team": "DevOps",
"customerName": "Apple",
"ide": "Visual Studio"
}
Tracked elements:
- Activity date
- Interaction type (completion or chat)
- Request count
- User/team/customer name identifiers from configuration
- IDE identifier
No workspace or source code is collected.
Output
Metrics saved to: Desktop\copilot-vs-log\metrics\
all_metrics.json - All aggregated metrics
YYYY-MM-DD_aggregated.json - Daily metrics
View Output
View → Output → Select "Copilot Log Collector" from dropdown
Sample Output
=== Recollecting 60 minutes time current 10/13/2025 2:30:00 PM found 3 files ===
User: John Doe, Team: Engineering
Parsed 150 new records incrementally
Aggregated into 12 metric groups
Updated: C:\Users\...\Desktop\copilot-vs-log\metrics\2025-10-13_aggregated.json
Updated: C:\Users\...\Desktop\copilot-vs-log\metrics\all_metrics.json
Total Requests: 150
Unique Dates: 1
Configuration
Settings: %AppData%\CopilotLogCollector\userconfig.txt
Parser state: %AppData%\CopilotLogCollector\parserstate.json
Troubleshooting
| Issue |
Suggested Action |
| Logs not appearing |
Ensure Copilot suggestions or chats are used |
| Folder not created |
Verify write permissions or set custom path |
| Errors shown |
Check View → Output → Copilot Logger |
Restarting or reinstalling the extension may resolve unresolved state issues.
🔒 Data Privacy & Compliance
This extension adheres to strict local-only data handling:
- ✅ Data collected: Copilot usage metadata only.
- ❌ Data not collected: source code, credentials, personal content.
- ✅ Data storage: exclusively on the user's machine.
- ❌ No network transmission or analytics services.
- ✅ Fully transparent, open-source implementation.
Organizational users are responsible for ensuring internal compliance with data retention policies. To cease data collection → disable or uninstall the extension.
Requirements
- Visual Studio 2022 or later
- GitHub Copilot extension installed
For Developers
Building and Publishing
For developers who want to build, modify, or publish new versions of this extension, please refer to the comprehensive guide:
PUBLISHING.md - Complete guide for building and publishing new versions
Topics covered:
- Prerequisites and setup
- Version management
- Building locally
- Publishing to Visual Studio Marketplace
- GitLab CI/CD pipeline configuration
- Troubleshooting common issues
Quick Start for Developers
# Build the extension
MSBuild.exe VS_CopilotLogCollector.sln /p:Configuration=Release /p:DeployExtension=false
# Publish to marketplace
.\publish-local.ps1 -PersonalAccessToken $env:MARKETPLACE_PAT
Repository Structure
vs_copilot_log_collector/
├── VS_CopilotLogCollector/ # Main extension project
│ ├── source.extension.vsixmanifest # Extension metadata & version
│ ├── *.cs # Source code files
│ └── VS_CopilotLogCollector.csproj # Project configuration
├── .gitlab-ci.yml # CI/CD pipeline configuration
├── publishManifest.json # Marketplace publishing config
├── publish-local.ps1 # Local publishing script
├── PUBLISHING.md # Developer guide
└── README.md # This file