github asmild/copilot-metrics-exporter v1.4.0

12 hours ago

This is a major update that migrates the exporter to GitHub's new Copilot Usage Metrics API (apiVersion 2026-03-10), replacing the deprecated /copilot/metrics endpoints that were shut down on April 2, 2026
(#28).

What changed

New API migration:

  • Switched to the new /copilot/metrics/reports/ report-based endpoints
  • Adopted the https://github.com/google/go-github library (v84) as the GitHub API client
  • Custom report model types to parse the new JSON format
  • Fixed timezone-related empty metrics issue (#19) — now uses UTC with day-before fallback

New metrics:

  • github_copilot_weekly_active_users — 7-day active users
  • github_copilot_monthly_active_users — 30-day active users
  • github_copilot_feature_suggestions_count{feature="..."} — code generation by feature
  • github_copilot_feature_acceptances_count{feature="..."} — code acceptance by feature
  • github_copilot_feature_interactions_count{feature="..."} — user interactions by feature

Features include: code_completion, chat_panel_agent_mode, agent_edit, chat_inline, chat_panel_ask_mode, and more.

Removed metrics (no longer available in the new API):

  • github_copilot_total_chat_insertions
  • github_copilot_total_chat_copies
  • github_copilot_active_users_breakdown

Docker image is back:

  • Minimal scratch-based image (~15 MB) available on GHCR
  • docker pull ghcr.io/asmild/copilot-metrics-exporter:latest

CI improvements:

  • Single binary build shared between release assets and Docker image (no double builds)
  • Updated GitHub Actions to v4/v5

Important: The new API requires the Copilot Metrics API access policy to be enabled in your GitHub Enterprise/Organization settings. If you get 404 errors, check: Enterprise Settings → Policies → Copilot
Metrics API.

How to use

Docker:
docker pull ghcr.io/asmild/copilot-metrics-exporter:latest
docker run --rm -v /path/to/config.yml:/config.yml ghcr.io/asmild/copilot-metrics-exporter:latest -c /config.yml

Binary:

  1. Download the binary for your platform from the Assets section below
  2. Make it executable (Linux/macOS): chmod +x copilot-metrics-exporter-*
  3. Run: ./copilot-metrics-exporter-*

Supported platforms: Linux (amd64, arm64), macOS (amd64, arm64), Windows (amd64)

Don't miss a new copilot-metrics-exporter release

NewReleases is sending notifications on new releases.