Skip to content
Notifications
Clear all

Just built an internal dashboard showing Copilot acceptance rates per developer.

5 Posts
5 Users
0 Reactions
1 Views
(@devops_grandad)
Estimable Member
Joined: 2 months ago
Posts: 100
Topic starter   [#5726]

Alright, let's get something straight. We're paying for this Copilot seat license for the whole engineering team, and I wanted to know if we're just burning money or if it's actually being used. Management asked for "ROI," which is a fancy way of saying "prove it's not a toy." So I slapped together an internal dashboard to track the real metric: acceptance rates. Not just suggestions made, but suggestions *kept*.

I'm not using any fancy external SaaS for this. It's a simple pipeline that taps into the GitHub API, since Copilot telemetry is available there if you have the right permissions. The core of it is a scheduled job that pulls the data, aggregates it, and dumps it into a time-series database (Prometheus, because it's already there for monitoring). Then it's just a Grafana dashboard on top.

Here's the gist of the collector script's logic. It's run via a Jenkins job (yes, Jenkins, it works and I don't have to explain YAML pipelines to it) every 6 hours.

```python
#!/usr/bin/env python3
"""
Queries GitHub API for Copilot metrics per user in our org.
Requires a PAT with `read:org` and `copilot:read` permissions.
"""
import requests
import os
from datetime import datetime, timedelta

API_URL = "https://api.github.com/orgs/YOUR_ORG/copilot/metrics"
HEADERS = {
"Authorization": f"token {os.getenv('GITHUB_COPILOT_TOKEN')}",
"Accept": "application/vnd.github.v3+json"
}

# Get last 7 days
end_date = datetime.now()
start_date = end_date - timedelta(days=7)
params = {
'since': start_date.isoformat(),
'until': end_date.isoformat(),
'per_page': 100
}

response = requests.get(API_URL, headers=HEADERS, params=params)
data = response.json()

# Data structure is a list of daily entries per user
for day in data.get('days', []):
for user_metric in day.get('users', []):
user = user_metric['login']
suggestions = user_metric['suggestions_count']
acceptances = user_metric['acceptances_count']
acceptance_rate = (acceptances / suggestions * 100) if suggestions > 0 else 0
# Emit to Prometheus pushgateway or print for scraping
print(f'copilot_acceptance_rate{{user="{user}"}} {acceptance_rate}')
print(f'copilot_suggestions_total{{user="{user}"}} {suggestions}')
```

The dashboard panels show:
* Acceptance rate (%) per developer, over time.
* Total suggestions accepted vs. rejected, stacked bar per team.
* A simple leaderboard (controversial, I know) of who's getting the most *useful* suggestions.
* A breakdown by language (from the API's language field) to see if it's more useful for our Python services vs. the frontend TypeScript.

What we've learned so far isn't surprising, but it's concrete:
* The average acceptance rate across the team is about 35%. Huge variance, from 15% to 60%.
* Senior devs have a lower acceptance rate but higher total acceptances. They're getting more suggestions and filtering harder.
* Junior devs have a higher acceptance rate, but the suggestions they accept are for boilerplate and simple patterns. They report it helps them learn API conventions.
* For our legacy Perl scripts (don't ask), the acceptance rate is near zero. It's useless there.

This data finally lets us have a real conversation. It's not about "is Copilot good?" It's about "for which parts of our work is it a net positive?" We're considering adjusting licenses or focusing training based on this, instead of just blindly renewing for everyone. The next step is correlating this with PR cycle time to see if higher acceptance rates link to faster delivery, or just more code.



   
Quote
(@devops_grunt_2024)
Estimable Member
Joined: 4 months ago
Posts: 148
 

Your dashboard is clever, I won't argue that. But you're measuring acceptance rates to prove ROI to management? That's just measuring how good the suggestions are, not whether it's actually changing how we work.

If a dev accepts 30% of Copilot's suggestions, they're still typing 70% of the code themselves. The real waste isn't the unused suggestions, it's the time spent reviewing and rejecting them. You're tracking the symptom, not the disease.

Using the GitHub API for this is the right move though. Avoids another vendor.


If it ain't broke, don't 'upgrade' it.


   
ReplyQuote
(@emilyw)
Estimable Member
Joined: 1 week ago
Posts: 59
 

That's a really good point about reviewing time being a cost. I hadn't thought of it that way.

So would a better metric be something like time spent per ticket, comparing developers who accept more suggestions to those who accept fewer? Or is that even harder to track properly?

I guess you can't really measure focus drain from glancing at a suggestion you then dismiss.



   
ReplyQuote
(@lisa_m_revops)
Trusted Member
Joined: 3 months ago
Posts: 42
 

That's a clever technical solution, and I respect the DIY approach. But you're measuring the wrong thing.

Acceptance rates are a vanity metric for a tool like Copilot. They tell you it's working, but not if it's *valuable*. I guarantee management will see a 30% acceptance rate and ask why we're paying for the 70% that gets ignored. And user286 is right, the cognitive tax of reviewing bad suggestions is a real cost you can't see on your dashboard.

If you want to prove ROI to skeptical managers, you need to tie it to business outcomes they already track. Has ticket cycle time changed since rollout? What about PR review turnaround? Measuring against existing KPIs is the only thing that cuts through the "it's a toy" argument.


Lisa M.


   
ReplyQuote
(@budget_buyer_99)
Reputable Member
Joined: 1 month ago
Posts: 148
 

I appreciate the scrappy, no-SaaS approach. Using the existing Prometheus/Grafana stack is the smart move.

But I'm already worried about the next step. Did you need a special Copilot license tier or add-on to get that API access? I've been burned by "oh that's an enterprise feature" hidden fees before.



   
ReplyQuote