Track Copilot code generation metrics in a dashboard
Source: GitHub Changelog
Overview
You can now view GitHub Copilot lines of code (LoC) metrics in the code generation insights dashboard.
Accessing the Dashboard
- Go to the Enterprises page, select your enterprise, and click the Insights tab.
- In the left sidebar, select Code generation.
- NDJSON downloads with more detailed data are available in the top‑right corner of the dashboard.
Metrics Displayed
- Lines of code changed with AI: Total lines added or deleted across all modes.
- User‑initiated code changes: Lines suggested or manually added through completions and chat actions.
- Agent‑initiated code changes: Lines automatically added or deleted by agents across edit, agent, and custom modes.
- Activity by model and language: Both user‑initiated and agent‑initiated activity, grouped by model and language.
Enabling Copilot Usage Metrics
To see these metrics, the Copilot usage metrics policy must be enabled.
- Go to the Enterprises page, select your enterprise, and click the AI Controls tab.
- In the left sidebar, select Copilot and scroll down to Metrics.
Permissions
Enterprise owners, billing managers, and users with an enterprise custom role that includes the View Enterprise Copilot Metrics permission can access the dashboard.
Additional Resources
To learn more, see our documentation.
Disclaimer: The UI for features in public preview is subject to change.