Backend: Duo Code Review namespace-level metrics, with filtering
Summary
Add codeReview field to aiMetrics. Create a new ai_usage_events_counts CH table to aggregate occurrences per event over time to use as a data source.
query {
group(fullPath: "gitlab-org") {
aiMetrics {
codeReview {
reviewByAuthorCount
reviewByNonAuthorCount
postCommentCount
thumbsUpCount
thumbsDownCount
}
}
}
}
Current State
No Duo Code Review namespace-level metrics are currently exposed.
Proposed Metrics
We need to add a aiMetrics.codeReview object to the graphql endpoint which can contain:
-
reviewByAuthorCount-request_review_duo_code_review_on_mr_by_author -
reviewByNonAuthorCount-request_review_duo_code_review_on_mr_by_non_author -
postCommentCount-post_comment_duo_code_review_on_diff -
thumbsUpCount-react_thumbs_up_on_duo_code_review_comment -
thumbsDownCount-react_thumbs_down_on_duo_code_review_comment
Filtering should be added to enable the use cases below.
Dashboard Visualizations Enabled
This will support:
- Frontend: Add Duo Code Review usage over time m... (#573979) • Unassigned • 18.7
- Frontend: Add Duo Code Review Requests by Role (#574003) • Unassigned • 18.7
- Frontend: Duo Code Review comment sentiment (#574005) • Unassigned • 18.7
Related
Edited by Felipe Cardozo