{"id":8919883,"url":"https://github.com/github-copilot-resources/copilot-metrics-viewer","last_synced_at":"2026-04-05T09:03:23.160Z","repository":{"id":213068750,"uuid":"732798198","full_name":"github-copilot-resources/copilot-metrics-viewer","owner":"github-copilot-resources","description":"Tool to visualize the Copilot metrics provided via the Copilot Business Metrics API ","archived":false,"fork":false,"pushed_at":"2026-03-29T06:20:42.000Z","size":6004,"stargazers_count":593,"open_issues_count":29,"forks_count":304,"subscribers_count":16,"default_branch":"main","last_synced_at":"2026-03-29T07:33:26.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://copilot-metrics-viewer-gthcc5cmd9ebf2ff.westeurope-01.azurewebsites.net/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github-copilot-resources.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS.md","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-17T21:18:50.000Z","updated_at":"2026-03-29T04:53:03.000Z","dependencies_parsed_at":"2025-05-13T18:22:07.582Z","dependency_job_id":"dbc0dda8-4f47-4bee-b0a5-b272e05e2fdc","html_url":"https://github.com/github-copilot-resources/copilot-metrics-viewer","commit_stats":null,"previous_names":["martedesco/copilot-metrics-viewer","github-copilot-community/copilot-metrics-viewer","github-copilot-resources/copilot-metrics-viewer"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/github-copilot-resources/copilot-metrics-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-copilot-resources%2Fcopilot-metrics-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-copilot-resources%2Fcopilot-metrics-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-copilot-resources%2Fcopilot-metrics-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-copilot-resources%2Fcopilot-metrics-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github-copilot-resources","download_url":"https://codeload.github.com/github-copilot-resources/copilot-metrics-viewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-copilot-resources%2Fcopilot-metrics-viewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-05-02T01:08:16.764Z","updated_at":"2026-04-02T17:55:48.577Z","avatar_url":"https://github.com/github-copilot-resources.png","language":"TypeScript","readme":"_NOTE: For information on support and assistance, click [here](https://github.com/github-copilot-resources/copilot-metrics-viewer/tree/main?tab=readme-ov-file#support)._\n\n\u003e **🚨 ACTION REQUIRED — Legacy API Shutdown on April 2, 2026**\n\u003e\n\u003e GitHub is **shutting down the legacy Copilot Metrics API on April 2, 2026**. Versions 2.x and earlier will **stop working** after this date.\n\u003e\n\u003e **You must upgrade to v3.0.0** to continue using Copilot Metrics Viewer.\n\u003e\n\u003e | | Details |\n\u003e |---|---|\n\u003e | **Last legacy release** | `v2.1.4` — Docker image: `ghcr.io/github-copilot-resources/copilot-metrics-viewer:v2.1.4` |\n\u003e | **New release** | `v3.0.0` — uses the new [Copilot Usage Metrics API](https://docs.github.com/en/enterprise-cloud@latest/rest/copilot/copilot-usage-metrics) |\n\u003e | **GitHub App update** | Add **\"Organization Copilot metrics: Read\"** permission ([setup guide](./DEPLOYMENT.md#github-app-registration)) |\n\u003e | **PostgreSQL (optional)** | Enable historical data storage with PostgreSQL ([migration guide](./MIGRATION_GUIDE.md#step-2-enable-historical-mode-optional)) |\n\u003e\n\u003e **Quick upgrade**: Pull `ghcr.io/github-copilot-resources/copilot-metrics-viewer:latest`, update your GitHub App permissions, and redeploy. Set `USE_LEGACY_API=true` to temporarily keep using the old API until the shutdown date.\n\n\u003e **Migration Resources**:\n\u003e - 📖 [Migration Guide](./MIGRATION_GUIDE.md) - Step-by-step migration instructions\n\u003e - 🧪 [Testing Guide](./TESTING_GUIDE.md) - How to test the migration\n\u003e - 📋 [Architecture Design](./API_MIGRATION_DESIGN.md) - Technical design details\n\u003e - 📚 [API Quick Reference](./API_QUICK_REFERENCE.md) - Legacy vs New API comparison\n\u003e - 📢 [GitHub Blog Announcement](https://github.blog/changelog/2026-01-29-closing-down-notice-of-legacy-copilot-metrics-apis/)\n\n# GitHub Copilot Metrics Viewer\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"150\" alt=\"image\" src=\"https://github.com/github-copilot-resources/copilot-metrics-viewer/assets/3329307/8473a694-217e-4aa2-a3c7-2222a321c336\"\u003e\n\u003c/p\u003e\n\nThis application displays a set of charts with various metrics related to GitHub Copilot for your \u003ci\u003eGitHub Organization\u003c/i\u003e or \u003ci\u003eEnterprise Account\u003c/i\u003e. These visualizations are designed to provide clear representations of the data, making it easy to understand and analyze the impact and adoption of GitHub Copilot. \n\n**API Support**:\n- Legacy API (default) - Works until April 2, 2026\n- New Usage Metrics API (opt-in) - Future-proof, async downloads\n- See [Migration Guide](./MIGRATION_GUIDE.md) for switching to new API\n\n## Application Overview\n\nThe GitHub Copilot Metrics Viewer provides comprehensive analytics through an intuitive dashboard interface:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Main Dashboard Overview\" src=\"./images/main-metrics-dashboard.png\"\u003e\n\u003c/p\u003e\n\n## New Features\n\n### Date Range Filtering (up to 100 days)\nUsers can now filter metrics for custom date ranges up to 100 days, with an intuitive calendar picker interface. The system also supports excluding weekends and holidays from calculations.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Date Range Filter\" src=\"./images/date-range-filter.png\"\u003e\n\u003c/p\u003e\n\n### Teams Comparison\nCompare Copilot metrics across multiple teams within your organization to understand adoption patterns and identify high-performing teams.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Teams Comparison\" src=\"./images/teams-comparison.png\"\u003e\n\u003c/p\u003e\n\n### GitHub.com Integration \u0026 Model Analytics\nView comprehensive statistics for GitHub.com features including Chat, PR Summaries, and detailed model usage analytics. Each section provides expandable details showing model types, editors, and usage patterns.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"GitHub.com Tab\" src=\"./images/github-com-tab.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Model Usage Details\" src=\"./images/github-com-models-expanded.png\"\u003e\n\u003c/p\u003e\n\n### CSV Export Functionality\nExport your metrics data in multiple formats for further analysis or reporting. Options include summary reports, full detailed exports, and direct clipboard copying.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"CSV Export Options\" src=\"./images/csv-export-functionality.png\"\u003e\n\u003c/p\u003e\n\n## Charts\n\n## Key Metrics\n\u003e[!NOTE]\n\u003e Metrics details are described in detail in [GitHub API response schema](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-an-organization)\n\nHere are the key metrics visualized in these charts:\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Key Metrics Overview\" src=\"./images/main-metrics-dashboard.png\"\u003e\n\u003c/p\u003e\n\n1. **Acceptance Rate:** This metric represents the ratio of accepted lines and suggestions to the total suggested by GitHub Copilot. This rate is an indicator of the relevance and usefulness of Copilot's suggestions. However, as with any metric, it should be used with caution as developers use Copilot in many different ways (research, confirm, verify, etc., not always \"inject\").\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"image\" src=\"./images/Acceptance_rate_bycount.png\"\u003e\n\u003c/p\u003e\n\n2. **Total Suggestions:** This chart illustrates the total number of code suggestions made by GitHub Copilot. It offers a view of the tool's activity and its engagement with users over time.\n\n3. **Total Acceptances:** This visualization focuses on the total number of suggestions accepted by users.\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"image\" src=\"./images/Total_suggestions_count.png\"\u003e\n\u003c/p\u003e\n\n4. **Total Lines Suggested:** Showcases the total number of lines of code suggested by GitHub Copilot. This gives an idea of the volume of code generation and assistance provided.\n\n5. **Total Lines Accepted:** As the name suggests, the total lines of code accepted by users (full acceptances) offering insights into how much of the suggested code is actually being utilized and incorporated into the codebase.\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"image\" src=\"./images/Total Lines.png\"\u003e\n\u003c/p\u003e\n\n6. **Total Active Users:** Represents the number of active users engaging with GitHub Copilot. This helps in understanding the user base growth and adoption rate.\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"image\" src=\"./images/Total_Active_users.png\"\u003e\n\u003c/p\u003e\n\n## Languages Breakdown Analysis\n\nPie charts with the top 5 languages by accepted prompts and acceptance rate (by count/by lines) are displayed at the top.\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Updated Language breakdown with charts and data table\" src=\"./images/languages-breakdown.png\"\u003e\n\u003c/p\u003e\n\nThe language breakdown analysis tab also displays a table showing the Accepted Prompts, Accepted Lines of Code, and Acceptance Rate (%) for each language over the selected time period. The entries are sorted by the number of _accepted lines of code descending_.\n\n## Copilot Chat Metrics\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Copilot Chat Metrics Dashboard\" src=\"./images/copilot-chat-metrics.png\"\u003e\n\u003c/p\u003e\n\n1. **Cumulative Number of Turns:** This metric represents the total number of turns (interactions) with the Copilot over the selected time period. A 'turn' includes both user inputs and Copilot's responses.\n\n2. **Cumulative Number of Acceptances:** This metric shows the total number of lines of code suggested by Copilot that have been accepted by users over the selected time period.\n\n3. **Total Turns | Total Acceptances Count:** This is a chart that displays the total number of turns and acceptances.\n\n4. **Total Active Copilot Chat Users:** A bar chart that illustrates the total number of users who have actively interacted with Copilot over the selected time period.\n\n## Seat Analysis\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"Seat Analysis Dashboard\" src=\"./images/seat-analysis.png\"\u003e\n\u003c/p\u003e\n\n1. **Total Assigned:** This metric represents the total number of Copilot seats assigned within the current organization/enterprise.\n\n2. **Assigned But Never Used:** This metric shows seats that were assigned but never used within the current organization/enterprise. The assigned timestamp is also displayed in the chart.\n\n3. **No Activity in the Last 7 Days:** Never used seats or seats used, but with no activity in the past 7 days.\n\n4. **No Activity in the Last 7 Days (including never used seats):** A table to display seats that have had no activity in the past 7 days, ordered by the date of last activity. Seats that were used earlier are displayed at the top.\n\n## Advanced Features\n\n### Flexible Date Range Selection\nThe application supports flexible date range selection allowing users to analyze metrics for any period up to 100 days. The date picker provides an intuitive calendar interface with options to exclude weekends and holidays from the analysis.\n\n### Data Export Capabilities\nMultiple export options are available in the API Response tab:\n- **Download CSV (Summary)**: Exports key metrics in a condensed format\n- **Download CSV (Full)**: Exports comprehensive detailed data\n- **Copy Metrics to Clipboard**: Quick copy functionality for immediate use\n- **Check Metric Data Quality**: Validates data integrity and completeness\n\n### Team Analytics\nOrganizations can compare metrics across different teams to:\n- Identify high-performing teams\n- Understand adoption patterns\n- Share best practices across teams\n- Monitor team-specific engagement levels\n\n### Model Usage Analytics\nDetailed insights into AI model usage including:\n- IDE Code Completions by editor and model type\n- IDE Chat interactions and model preferences\n- GitHub.com Chat usage patterns\n- PR Summary generation statistics\n- Custom vs. default model adoption rates\n\n## Setup Instructions\n\nIn the `.env` file, you can configure several environment variables that control the behavior of the application.\n\nPublic variables:\n- `NUXT_PUBLIC_IS_DATA_MOCKED`\n- `NUXT_PUBLIC_SCOPE`\n- `NUXT_PUBLIC_GITHUB_ENT`\n- `NUXT_PUBLIC_GITHUB_ORG`\n- `NUXT_PUBLIC_GITHUB_TEAM`\n\ncan be overridden by route parameters, e.g.\n- `http://localhost:3000/enterprises/octo-demo-ent`\n- `http://localhost:3000/orgs/octo-demo-org`\n- `http://localhost:3000/orgs/octo-demo-org/teams/the-a-team`\n- `http://localhost:3000/enterprises/octo-demo-ent/teams/the-a-team`\n- `http://localhost:3000/orgs/mocked-org?mock=true`\n\n#### NUXT_PUBLIC_SCOPE (Required!)\n\nThe `NUXT_PUBLIC_SCOPE` environment variable in the `.env` file determines the default scope of the API calls made by the application. It can be set to 'enterprise', 'organization', 'team-organization' or 'team-enterprise'.\n\n- If set to 'enterprise', the application will target API calls to the GitHub Enterprise account defined in the `NUXT_PUBLIC_GITHUB_ENT` variable.\n- If set to 'organization', the application will target API calls to the GitHub Organization account defined in the `NUXT_PUBLIC_GITHUB_ORG` variable.\n- If set to 'team', the application will target API calls to GitHub Team defined in the `NUXT_PUBLIC_GITHUB_TEAM` variable under `NUXT_PUBLIC_GITHUB_ORG` GitHub Organization.\n\nFor example, if you want to target the API calls to an organization, you would set `NUXT_PUBLIC_SCOPE=organization` in the `.env` file.\n\n\u003e[!INFO]\n\u003e Environment variables with `NUXT_PUBLIC` scope are available in the browser (are public).\n\u003e See [Nuxt Runtime Config](https://nuxt.com/docs/guide/going-further/runtime-config) for details.\n\n````\nNUXT_PUBLIC_SCOPE=organization\n\nNUXT_PUBLIC_GITHUB_ORG=\u003cYOUR-ORGANIZATION\u003e\n\nNUXT_PUBLIC_GITHUB_ENT=\n````\n\n#### NUXT_PUBLIC_GITHUB_TEAM\n\nThe `NUXT_PUBLIC_GITHUB_TEAM` environment variable filters metrics for a specific GitHub team within an Enterprise or Organization account.\n‼️ Important ‼️ When this variable is set, all displayed metrics will pertain exclusively to the specified team. To view metrics for the entire Organization or Enterprise, remove this environment variable.\n\n\u003e[!WARNING]\n\u003e GitHub provides Team metrics [for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.](https://docs.github.com/en/rest/copilot/copilot-usage?apiVersion=2022-11-28#get-a-summary-of-copilot-usage-for-a-team).\n\n````\nNUXT_PUBLIC_GITHUB_TEAM=\n````\n\n#### NUXT_PUBLIC_IS_DATA_MOCKED\n\nVariable is false by default. To view mocked data switch it to true or use query parameter `?mock=true`.\n\n````\nNUXT_PUBLIC_IS_DATA_MOCKED=false\n````\n\n#### NUXT_GITHUB_TOKEN\n\nSpecifies the GitHub Personal Access Token utilized for API requests. Generate this token with the following permissions: _Read access to members_, _organization copilot metrics_, and _organization copilot seat management_.\n\n\u003e [!IMPORTANT]\n\u003e **v3.0 Migration:** The new Copilot Usage Metrics API requires **Read access to members, organization copilot metrics, and organization copilot seat management** permissions. Without this, the new API endpoints will return 400/403 errors. See [GitHub App Registration](DEPLOYMENT.md#github-app-registration) for setup details.\n\nToken is not used in the frontend.\n\n````\nNUXT_GITHUB_TOKEN=\n````\n\n#### NUXT_SESSION_PASSWORD (Required!)\n\nThis variable is required to encrypt user sessions, it needs to be at least 32 characters long.\nFor more information see [Nuxt Sessions and Authentication](https://nuxt.com/docs/guide/recipes/sessions-and-authentication#cookie-encryption-key).\n\n\u003e[!WARNING]\n\u003e This variable is required starting from version 2.0.0.\n\n#### NUXT_PUBLIC_USING_GITHUB_AUTH\n\nDefault is `false`. When set to `true`, GitHub OAuth App Authentication will be performed to verify users' access to the dashboard. For this, a GitHub App must be registered and installed in the enterprise/org. See [GitHub App Registration](DEPLOYMENT.md#github-app-registration) for the steps to follow.\n\nVariables required for GitHub Auth are:\n1. `NUXT_OAUTH_GITHUB_CLIENT_ID` - client ID of the GitHub App.\n2. `NUXT_OAUTH_GITHUB_CLIENT_SECRET` - client secret of the GitHub App.\n3. [Optional] `NUXT_OAUTH_GITHUB_CLIENT_SCOPE` for scope requests when using OAuth App instead of GitHub App. See [GitHub docs](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/differences-between-github-apps-and-oauth-apps) for details.\n\n\u003e[!WARNING]\n\u003e Only users with permissions (scopes listed in [NUXT_GITHUB_TOKEN](#NUXT_GITHUB_TOKEN)) can view copilot metrics, GitHub uses the authenticated users permissions to make API calls for data.\n\n#### HTTP_PROXY\n\nSolution supports HTTP Proxy settings when running in corporate environment. Simply set `HTTP_PROXY` environment variable.\n\nFor custom CA use environment variable `CUSTOM_CA_PATH` to load the certificate into proxy agent options.\n\n#### NITRO_PORT\n\nDefault is `80` in the [Dockerfile](Dockerfile). It defines the port number that Nitro (Nuxt’s server engine) will listen on.\n\nFor example, it should be set to a number between 1024 and 49151 if the application is run as a non-root user.\n\n## Install Dependencies\n\n```bash\nnpm install\n```\n\n### Compiles and Runs the Application\n\n```bash\nnpm run dev\n```\n\n### Docker Build\n\n```bash\ndocker build -t copilot-metrics-viewer .\n```\n\n### Docker Run\n\n```bash\ndocker run -p 8080:80 --env-file ./.env copilot-metrics-viewer\n```\n\nThe application will be accessible at http://localhost:8080\n\n## Health Check Endpoints\n\nFor Kubernetes deployments and health monitoring, the application provides dedicated health check endpoints that don't require authentication and don't make external API calls:\n\n- **`/api/health`** - General health check endpoint\n- **`/api/ready`** - Readiness probe endpoint \n- **`/api/live`** - Liveness probe endpoint\n\nAll endpoints return JSON responses with status information and respond in ~200ms, making them ideal for Kubernetes health checks instead of using the root `/` endpoint which triggers GitHub API calls.\n\n### Example Kubernetes Configuration\n\n```yaml\nlivenessProbe:\n  httpGet:\n    path: /api/live\n    port: 80\n  initialDelaySeconds: 30\n  periodSeconds: 10\n\nreadinessProbe:\n  httpGet:\n    path: /api/ready\n    port: 80\n  initialDelaySeconds: 5\n  periodSeconds: 5\n```\n\n## License\n\nThis project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE.txt) for the full terms.\n\n## Maintainers\n\n[@martedesco](https://github.com/martedesco) \u0026 [@karpikpl](https://github.com/karpikpl)\n\n## Support\n\nThis project is independently developed and maintained, and is not an official GitHub product. It thrives through the dedicated efforts of ([@martedesco](https://github.com/martedesco)), ([@karpikpl](https://github.com/karpikpl)) and our wonderful contributors. A heartfelt thanks to all our contributors! ✨\n\nI aim to provide support through [GitHub Issues](https://github.com/github-copilot-resources/copilot-metrics-viewer/issues). While I strive to stay responsive, I can't guarantee immediate responses. For critical issues, please include \"CRITICAL\" in the title for quicker attention. 🙏🏼\n","funding_links":[],"categories":["Bicep","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub-copilot-resources%2Fcopilot-metrics-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub-copilot-resources%2Fcopilot-metrics-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub-copilot-resources%2Fcopilot-metrics-viewer/lists"}