Add Generic AI Usage Events Aggregation Engine
Summary
Implement a generic aggregation engine for GitLab Duo (AI) usage analytics that provides comprehensive insights across all AI features. This engine will be backed by the existing ai_usage_events ClickHouse table and integrated under the aiUsage GraphQL type, complementing the specific aggregation engines for Code Suggestions and Agent Platform Sessions.
Proposal
Create a new AiUsageEvents generic aggregation engine that will:
- Utilize the existing
ai_usage_eventsClickHouse table - Implement the aggregation engine at
ee/app/models/analytics/aggregation_engines/ai_usage_events.rb - Mount the engine on the existing
AiUsageGraphQL type - Support cross-feature analytics with the following metrics:
Metrics to Implement
- Duo Features Usage (number of users who used Duo)
- GitLab Duo Code Review Requests
- GitLab Duo Code Review Requests by Role
- GitLab Duo Code Review Comments
- GitLab Duo Code Review Comments Sentiment
- Duo Chat Usage
- Duo RCA (Root Cause Analysis) Usage
- GitLab Duo Code Review Usage by User
- GitLab Duo Root Cause Analysis Usage by User
- GitLab Duo Usage by User
- Number of unique features used.
Edited by Pavel Shutsin