You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> 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)
19
+
18
20
Here are the key metrics visualized in these charts:
19
-
1.**Acceptance Rate:** This metric represents the ratio of accepted lines to the total lines suggested by GitHub Copilot. This rate is an indicator of the relevance and usefulness of Copilot's suggestions.
2.**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.
25
+
1.**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").
3.**Total Acceptances:** This visualization focuses on the total number of suggestions accepted by users.
30
+
2.**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.
27
31
32
+
3.**Total Acceptances:** This visualization focuses on the total number of suggestions accepted by users.
4.**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.
33
38
34
-
5.**Total Lines Accepted:** As the name says, the total lines of code accepted by users (full acceptances) offering insights into how much of the suggested code is actually being utilized incorporated to the codebase.
35
-
39
+
5.**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.
6.**Total Active Users:** Represents the number of active users engaging with GitHub Copilot. This helps in understanding the user base growth and adoption rate.
The language breakdown analysis tab also displays a table showing the Accepted Prompts, Accepted Lines of Code, and Acceptance Rate (%) for each language over the past 28 days. The entries are sorted by the number of _accepted lines of code descending_.
@@ -66,25 +68,24 @@ The language breakdown analysis tab also displays a table showing the Accepted P
66
68
67
69
2.**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 past 28 days.
68
70
69
-
3.**Total Turns | Total Acceptances Count:** This is a chart that displays the total number of turns and acceptances
71
+
3.**Total Turns | Total Acceptances Count:** This is a chart that displays the total number of turns and acceptances.
70
72
71
-
4.**Total Active Copilot Chat Users:**a bar chart that illustrates the total number of users who have actively interacted with Copilot over the past 28 days.
73
+
4.**Total Active Copilot Chat Users:**A bar chart that illustrates the total number of users who have actively interacted with Copilot over the past 28 days.
1.**Total Assigned:** This metric represents the total number of Copilot seats assigned within current organization/enterprise.
80
+
1.**Total Assigned:** This metric represents the total number of Copilot seats assigned within the current organization/enterprise.
79
81
80
82
2.**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.
81
83
82
-
3.**No Activity in the Last 7 days:**never used seats or seats used, but with no activity in the past 7 days.
84
+
3.**No Activity in the Last 7 Days:**Never used seats or seats used, but with no activity in the past 7 days.
83
85
84
-
4.**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.
86
+
4.**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.
85
87
86
-
87
-
## Setup instructions
88
+
## Setup Instructions
88
89
89
90
In the `.env` file, you can configure several environment variables that control the behavior of the application.
90
91
@@ -100,77 +101,81 @@ For example, if you want to target the API calls to an organization, you would s
100
101
````
101
102
VUE_APP_SCOPE=organization
102
103
103
-
VUE_APP_GITHUB_ORG=<YOUR-ORGANIZATION>
104
+
VUE_APP_GITHUB_ORG=<YOUR-ORGANIZATION>
104
105
105
106
VUE_APP_GITHUB_ENT=
106
107
````
108
+
107
109
#### VUE_APP_GITHUB_TEAM
108
110
109
111
The `VUE_APP_GITHUB_TEAM` environment variable filters metrics for a specific GitHub team within an Enterprise or Organization account.
110
112
‼️ 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.
111
113
112
114
````
113
115
VUE_APP_GITHUB_TEAM=
114
-
115
116
````
116
117
117
118
#### VUE_APP_MOCKED_DATA
118
119
119
120
To access Copilot metrics from the last 28 days via the API and display actual data, set the following boolean environment variable to `false`:
120
121
121
-
```
122
-
VUE_APP_MOCKED_DATA=false
123
-
```
122
+
````
123
+
VUE_APP_MOCKED_DATA=false
124
+
````
124
125
125
126
#### VUE_APP_GITHUB_TOKEN
127
+
126
128
Specifies the GitHub Personal Access Token utilized for API requests. Generate this token with the following scopes: _copilot_, _manage_billing:copilot_, _manage_billing:enterprise_, _read:enterprise_, _read:org_.
127
129
128
-
```
129
-
VUE_APP_GITHUB_TOKEN=
130
-
```
130
+
````
131
+
VUE_APP_GITHUB_TOKEN=
132
+
````
131
133
132
-
## Install dependencies
133
-
```
134
+
## Install Dependencies
135
+
136
+
```bash
134
137
npm install
135
138
```
136
139
137
-
### Compiles and runs the application
138
-
```
140
+
### Compiles and Runs the Application
141
+
142
+
```bash
139
143
npm run serve
140
144
```
141
145
142
-
### Docker build
143
-
```
146
+
### Docker Build
147
+
148
+
```bash
144
149
docker build -t copilot-metrics-viewer .
145
150
```
146
151
147
-
### Docker run
148
-
```
152
+
### Docker Run
153
+
154
+
```bash
149
155
docker run -p 8080:80 --env-file ./.env copilot-metrics-viewer
150
156
```
157
+
151
158
The application will be accessible at http://localhost:8080
152
159
153
160
## Running with API Proxy
154
161
155
-
Project can run with an API proxy which hides GitHub tokens and is secure enough to be deployed.
156
-
Api Proxy project is in `\api` directory. Vue app makes the calls to `/api/github` which then are proxied to `https://api.github.com` with appropriate bearer token.
157
-
158
-
Proxy can authenticate user using GitHub App. In order to do that, following environment variables are required:
162
+
The project can run with an API proxy which hides GitHub tokens and is secure enough to be deployed.
163
+
The API Proxy project is in the `\api` directory. The Vue app makes the calls to `/api/github` which are then proxied to `https://api.github.com` with the appropriate bearer token.
159
164
160
-
*`GITHUB_CLIENT_ID` - client Id of the GitHub App registered and installed in the enterprise/org with permissions listed above.
161
-
*`GITHUB_CLIENT_SECRET` - client secret of the GitHub App
162
-
*`SESSION_SECRET` - random string for securing session state
165
+
The proxy can authenticate the user using a GitHub App. In order to do that, the following environment variables are required:
163
166
164
-
If you want use a custom path for your `.env` file you can set the environment variable `DOTENV_CONFIG_PATH`.
167
+
*`GITHUB_CLIENT_ID` - client ID of the GitHub App registered and installed in the enterprise/org with permissions listed above.
168
+
*`GITHUB_CLIENT_SECRET` - client secret of the GitHub App.
169
+
*`SESSION_SECRET` - random string for securing session state.
Proxy can also run with token hardcoded on the backend (which hides it from frontend calls), here's a sample:
199
+
The proxy can also run with the token hardcoded on the backend (which hides it from frontend calls), here's a sample:
195
200
196
201
```bash
197
202
docker run -it --rm -p 3000:3000 \
@@ -225,6 +230,6 @@ This project is licensed under the terms of the MIT open source license. Please
225
230
226
231
## Support
227
232
228
-
This 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)) our wonderful contributors. A heartfelt thanks to all our contributors! ✨
233
+
This 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! ✨
229
234
230
235
I 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. 🙏🏼
0 commit comments