-
Notifications
You must be signed in to change notification settings - Fork 667
Description
Search before asking
- I had searched in the issues and found no similar feature requirement.
Use case
Search before asking
- I had searched in the issues and found no similar feature requirement.
Description
I would like to contribute a new plugin to DevLake that ingests GitHub Copilot Usage Metrics.
To fully understand the impact of AI on our development lifecycle, we need both high-level adoption trends and granular user-level data. I plan to use the Copilot Usage Metrics API (2022-11-28) to collect this data.
Strategic Value: Why Measure This?
Integrating Copilot metrics allows us to answer critical questions about the ROI of AI coding assistants by correlating them with existing DORA and engineering metrics:
- Velocity & Lead Time:
- Hypothesis: High Copilot usage (acceptance rates) should reduce Lead Time for Changes by speeding up the "coding" phase.
- Metric: Correlate
total_lines_acceptedwithPR Cycle Time.
- Quality & Stability:
- Hypothesis: We need to monitor if increased AI speed impacts code quality.
- Metric: Correlate
copilot_active_userswith Change Failure Rate (CFR) and Bug Count.
- Adoption vs. Performance:
- Hypothesis: Teams with higher Copilot adoption perform better.
- Metric: Compare Deployment Frequency between high-adoption and low-adoption teams (using the User-level breakdown).
Data Sources
I will target the following two report endpoints:
-
Enterprise Metrics (Aggregated)
- Endpoint:
GET /enterprises/{enterprise}/copilot/metrics/reports/enterprise-1-day - Purpose: Provides high-level daily summaries of active users, acceptance rates, and chat interactions across the entire enterprise.
- Docs: Get Copilot enterprise usage metrics
- Endpoint:
-
User Metrics (Granular)
- Endpoint:
GET /enterprises/{enterprise}/copilot/metrics/reports/users-1-day - Purpose: Provides detailed usage stats per user (e.g., lines suggested vs. accepted, editor used, last activity). This allows for correlation with individual developer output.
- Docs: Get Copilot users usage metrics
- Endpoint:
Note: I will use the *-1-day endpoints to allow DevLake to incrementally collect and store daily historical data.
Implementation Plan
I propose implementing this as a Python Plugin using the pydevlake framework.
Proposed Scope:
- Create a new Python plugin
copilot. - Stream 1:
CopilotEnterpriseMetricsStream:- Fetches the daily enterprise report URL.
- Downloads and parses the JSON to store daily aggregated stats.
- Stream 2:
CopilotUserMetricsStream:- Fetches the daily user report URL.
- Downloads and parses the JSON to store individual user activity.
Questions for Maintainers
- Domain Modeling:
- Should the Enterprise Metrics map to a new table (e.g.,
copilot_enterprise_daily)? - Should the User Metrics map to a new table (e.g.,
copilot_user_daily)?### Search before asking
- Should the Enterprise Metrics map to a new table (e.g.,
- I had searched in the issues and found no similar feature requirement.
Description
I would like to contribute a new plugin to DevLake that ingests GitHub Copilot Usage Metrics.
To fully understand the impact of AI on our development lifecycle, we need both high-level adoption trends and granular user-level data. I plan to use the Copilot Usage Metrics API (2022-11-28) to collect this data.
Strategic Value: Why Measure This?
Integrating Copilot metrics allows us to answer critical questions about the ROI of AI coding assistants by correlating them with existing DORA and engineering metrics:
- Velocity & Lead Time:
- Hypothesis: High Copilot usage (acceptance rates) should reduce Lead Time for Changes by speeding up the "coding" phase.
- Metric: Correlate
total_lines_acceptedwithPR Cycle Time.
- Quality & Stability:
- Hypothesis: We need to monitor if increased AI speed impacts code quality.
- Metric: Correlate
copilot_active_userswith Change Failure Rate (CFR) and Bug Count.
- Adoption vs. Performance:
- Hypothesis: Teams with higher Copilot adoption perform better.
- Metric: Compare Deployment Frequency between high-adoption and low-adoption teams (using the User-level breakdown).
Data Sources
I will target the following two report endpoints:
-
Enterprise Metrics (Aggregated)
- Endpoint:
GET /enterprises/{enterprise}/copilot/metrics/reports/enterprise-1-day - Purpose: Provides high-level daily summaries of active users, acceptance rates, and chat interactions across the entire enterprise.
- Docs: Get Copilot enterprise usage metrics
- Endpoint:
-
User Metrics (Granular)
- Endpoint:
GET /enterprises/{enterprise}/copilot/metrics/reports/users-1-day - Purpose: Provides detailed usage stats per user (e.g., lines suggested vs. accepted, editor used, last activity). This allows for correlation with individual developer output.
- Docs: Get Copilot users usage metrics
- Endpoint:
Note: I will use the *-1-day endpoints to allow DevLake to incrementally collect and store daily historical data.
Implementation Plan
I propose implementing this as a Python Plugin using the pydevlake framework.
Proposed Scope:
- Create a new Python plugin
copilot. - Stream 1:
CopilotEnterpriseMetricsStream:- Fetches the daily enterprise report URL.
- Downloads and parses the JSON to store daily aggregated stats.
- Stream 2:
CopilotUserMetricsStream:- Fetches the daily user report URL.
- Downloads and parses the JSON to store individual user activity.
Questions for Maintainers
- Domain Modeling:
- Should the Enterprise Metrics map to a new table (e.g.,
copilot_enterprise_daily)? - Should the User Metrics map to a new table (e.g.,
copilot_user_daily)?
- Should the Enterprise Metrics map to a new table (e.g.,
Description
No response
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct