[go: up one dir, main page]

Skip to content

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:

Related

Part of https://gitlab.com/groups/gitlab-org/-/epics/15830+

Edited by Felipe Cardozo