Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>GitHub Copilot Usage MetricsNew to Visual Studio Code? Get it now.
GitHub Copilot Usage Metrics

GitHub Copilot Usage Metrics

Vinay Pratap Singh

|
21 installs
| (1) | Free
Private, local GitHub Copilot usage insights by project, model and day, with clear data coverage and native troubleshooting. Independent and not affiliated with GitHub or Microsoft.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GitHub Copilot Usage Metrics

See where your recorded GitHub Copilot usage went, privately on your computer. Explore credits, tokens, projects, models and days, with clear limits on what the local records can tell you. This is not an account billing meter and is not affiliated with, endorsed by, or supported by Microsoft or GitHub.

Start Here

  1. Open GitHub Copilot Usage Metrics: Setup and Help from the Command Palette.
  2. Open the dashboard. Existing saved sessions work without experimental logging.
  3. Use the visible Overview, Activity, Breakdown, Agents, Sessions, and Skills tabs. Insights combines Activity patterns and Forecast. Data health explains sources and failures; Settings holds preferences.
  4. For richer future coverage, review the optional logging disclosure. Enabling capture asks for consent and may require a window reload.

The report shell appears before scanning. A bounded recent-data pass is followed by full indexing. Later scans reuse unchanged saved sessions and request logs. Cancel scan keeps displayed data available, and failed refreshes are retryable.

The Sessions tab keeps one row per session and prefers a retained session title over its recorded summary. Session credits covers all retained dates and models; Credits in scope shows the selected portion separately. Other session measures follow the selected scope. Missing history is never estimated. Debug-only billing can read matching saved metadata for a title without using any of that saved copy's usage figures.

Table headers sort in either direction. Session activity and dated records default to newest first; aggregated tables default to their main numeric measure, highest first. Sort choices survive data refreshes, including grouped breakdowns.

How it works

The bundled Python extractor stays the single source of truth. The extension:

  1. runs its bundled usage.py (writes report data),
  2. builds a nonce-protected webview from its bundled assets and the JSON data,
  3. re-runs the extractor when you click Refresh data (or run GitHub Copilot Usage Metrics: Refresh Data), then updates the panel with fresh numbers.

Packaged builds never execute an extractor found in an open workspace or load scripts from an old generated HTML report. The extension runs on the local desktop host and requires a trusted window; virtual workspaces are unsupported.

The extension does not transmit usage data or collect analytics. This does not describe GitHub Copilot's own service traffic or telemetry.

Requirements

  • VS Code desktop 1.85.0 or newer, in a trusted window. Browser-only and virtual workspaces are unsupported. Remote windows still read the local computer's logs.
  • Python 3.12+ on your PATH. No pip packages are needed — the extractor is stdlib-only. If your interpreter isn't named python, set ghcpUsage.pythonPath.
  • Token, AI-credit (AIU) & model figures come from fields GitHub Copilot Chat writes into its own local request logs (debug-logs and chatSessions). Older sessions get trimmed and debug logs rotate, so a machine may show only request counts. Run GitHub Copilot Usage Metrics: Data Health to see exactly what was found and why.

Data source and agent debug logs

Open the dashboard, click the Config gear, and use VS Code data source:

  • Automatic (recommended) compares agent debug logs and saved chat sessions per session, then keeps the fuller copy.
  • Agent debug logs only gives the richest per-call detail while those logs are retained.
  • Saved chat sessions only works when debug logs are unavailable. It reads workspace sessions plus globalStorage/emptyWindowChatSessions, with lower coverage where VS Code trimmed request bodies.

When the dashboard detects no agent debug-log sessions, Enable logging offers an explicit consent prompt. Debug logs can contain prompts, responses, tool arguments and sensitive paths. Only after consent does the extension set github.copilot.chat.agentDebugLog.fileLogging.enabled to true at user scope. It checks that the setting is supported and effective before offering a reload. It does not change log verbosity or increase retention. Saved sessions remain available when you decline. Existing history cannot be recovered if its logs were never written.

Develop / run

cd extension
npm install
npm run bundle
npm run compile
npm test

Then press F5 (Run Extension) and invoke GitHub Copilot Usage Metrics: Open Dashboard from the Command Palette.

Settings

Setting Default Description
ghcpUsage.pythonPath python User-level interpreter setting. Workspace overrides are ignored.
ghcpUsage.repoPath (empty) Development Extension Host only: explicit absolute extractor directory. Packaged builds ignore it and use the bundle.
ghcpUsage.source auto Automatic source selection, debug logs only, or saved sessions only.
ghcpUsage.quickScanDays 10 Recency window for the time-bounded first pass. Cached history remains usable.
ghcpUsage.includeVisualStudio false Optional Preview trace reader. Credit amounts and exact multi-instance attribution are not established.

Troubleshooting

Symptom Action
Python missing or too old Set the user-level interpreter to Python 3.12 or newer, then retry.
No data Reset filters, check the selected source and Data health. This tool reads this computer, not cloud or other-device usage.
Partial history Let the full scan complete. Saved records and debug logs can both be trimmed; enabling capture cannot restore the past.
Refresh fails The displayed report stays available. Check Data health, then retry after correcting access or source issues.
Another window owns the scan Wait for that scan to finish or cancel it in its window, then retry.
Credits differ from billing Check date range, account scope, source applicability and report freshness. Recorded zero, missing credit values and non-applicable credits differ.

Privacy And Exports

GitHub Copilot Usage Metrics is independent and does not transmit usage data or collect extension analytics. It reads local Copilot/Claude records and, when explicitly selected, optional Visual Studio trace files. These are private, version-dependent formats.

What Is Retained

Derived reports and caches live in VS Code's extension-specific global storage, outside the installed extension code. They include project/model/agent names, counts, tokens, recorded credit values, source diagnostics and retained session labels. Session labels may contain opening prompts. Local error detail can contain paths or source data. Treat these files as private.

Saved-session caches exclude prompt and response bodies and tool arguments. They retain only the fields needed to reconstruct usage and attribution. The cache is not a permanent archive: records whose upstream files disappear are not counted as current observations.

Exports And Cleanup

CSV exports include selected project names and usage. Settings exports can contain personal filters and billing comparisons. Choose their destination deliberately. Support diagnostics are redacted to platform/version, scan counts, timing and allowlisted error categories, then shown for review before saving. Raw paths, project names, session labels and error messages are excluded from that export.

Clear Derived Data asks for confirmation, cancels this window's scan, and removes only this extension's report/cache directories. It does not remove original Copilot logs, change logging settings, delete exported files, or remove legacy reports made by the standalone CLI or earlier extension versions.

Optional Experimental Capture

Debug file logging can retain sensitive conversation content. It is optional; saved-session reporting works without it. Enabling it requires explicit consent and updates only the supported user-level Copilot setting. Copilot controls its own retention. The extension does not enable Trace logging, enlarge retention, or recover deleted history. Disabling capture later does not delete existing logs.

These statements cover this extension, not GitHub Copilot's own service traffic or telemetry. Review your organization's policies before enabling additional capture.

Interpreting The Numbers

Recorded credits are not an account bill: this report covers retained records on one computer. Different sources count requests differently, and missing values are not proof of zero usage. Claude Code and the optional Visual Studio parser do not provide authoritative GitHub credits. Skill attribution can overlap when a session uses several skills, so skill totals must not be added together.

Forecasts are projections from recorded history, not measured future usage or a promise of the next bill. Billing comparisons need matching dates, accounts and units. Cache definitions vary by source: VS Code exposes cache reads while CLI and Claude can include cache writes. Activity and token counts do not measure developer productivity or output quality.

Support

Use this extension's Marketplace Q & A tab for questions and reproducible bug reports. Include the extension version, VS Code version, operating system and steps to reproduce. Attach only diagnostics you have reviewed in the redacted export preview. Never post raw logs, session labels, private project names or billing information. Microsoft and GitHub do not provide support for this extension.

Compatibility And Qualification

The 1.6.1 update compiles against API types pinned to VS Code 1.85.0. On Windows, the packaged extension passed fresh-install and same-version reinstall checks on VS Code 1.85.0 and 1.136.1: activation, commands, native walkthrough, saved-session scanning with exact synthetic totals, refresh, reopen, empty history, cache invalidation and storage outside the installation directory.

The configured CI matrices cover Windows/macOS/Linux with Python 3.12/3.14 for source tests, plus minimum/current VS Code packaged-host checks with Python 3.12. Their green runs must be confirmed on the release revision. Real native Save As, capture/cleanup confirmation dialogs, missing-Python recovery, active-scan cancel, older-version upgrade and a full accessibility/offline audit are separate qualification tasks. Host tests do not substitute for those UI checks. Visual Studio stays opt-in Preview pending producer/instance qualification.

Package a .vsix

cd extension
npm run package

Both npm run package and the compatibility alias npm run package:candidate produce ghcp-usage-metrics-1.7.0.vsix. After a successful build, older packages for this project are removed so there is only one file to install. A failed build does not trigger cleanup. Neither command installs or publishes the extension. The packager is pinned in the development lockfile. The changelog records this update under 1.6.1; Marketplace publication still requires a separate upload.

Maintainer host checks, after packaging:

npm run test:host -- 1.85.0
npm run test:host -- stable

The runner downloads disposable VS Code binaries and installs only into temporary profiles. Synthetic source roots replace home/config discovery for the test process; personal logs and the active extension installation are not used.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft