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
Screenshot 2026-03-31 at 12.57.26 PM.png Screenshot 2026-03-31 at 12.48.23 PM.png

How to set up and validate locally

  1. Please make sure that you're on the GitLab Ultimate plan (if necessary, request a license).
  2. Configure your GDK to use ClickHouse
  3. 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)
  4. Create a new project or select an existing one.
  5. 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
  6. Navigate to Analytics Dashboard > GitLab Duo and SDLC trends in the sidebar menu
  7. 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)

Edited by Rudy Crespo

Merge request reports

Loading
Loading