Add GitLab Duo agent/flow users metric tile
What does this MR do and why?
Adds new single stat visualization to the analytics dashboard that displays GitLab Duo agent/flow users count. This replaces the Code Suggestions acceptance rate metric tile.
AI Summary
Replaces the Code Suggestions acceptance rate metric with GitLab Duo agent/flow users in the AI Impact Dashboard, shifting from tracking suggestion acceptance percentages to measuring active user engagement with AI agents and workflows.
Key Changes
- Removes acceptance rate metric tile; adds new agent/flow users metric tile
- Adds GraphQL query and fragment for agent platform session data
- Updates data source to extract user counts instead of calculating percentages
- Adds new metric constant and updates dashboard configuration
- Updates documentation, tests, and localization strings
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Please make sure that you're on the GitLab Ultimate plan (if necessary, request a license).
- Configure your GDK to use ClickHouse
- Make sure ClickHouse is being used for Analytics by running this in the Rails console:
Gitlab::CurrentSettings.current_application_settings.update(use_clickhouse_for_analytics: true) - Create a new project or select an existing one.
- Seed data for the project using its ID in
PROJECT_ID=STEP_4_PROJECT_ID FILTER=ai_usage_stats bundle exec rake db:seed_fu - Navigate to
Analytics Dashboard > GitLab Duo and SDLC trendsin the sidebar menu - Verify that new metric tile works correctly
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #587300 (closed)

