Add Code generation volume trends chart
What does this MR do and why?
Adds Code generation volume trends panel – a multi-series area chart showing code suggestions' lines of code shown and accepted over time – to the GitLab Duo and SDLC trends analytics dashboard.
References
Screenshots or screen recordings
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) -
Mock AI Impact analytics permissions:
diff --git a/ee/app/models/ee/user.rb b/ee/app/models/ee/user.rb index 83e827808849..c89ecd514553 100644 --- a/ee/app/models/ee/user.rb +++ b/ee/app/models/ee/user.rb @@ -522,6 +522,7 @@ def using_gitlab_com_seat?(namespace) end def assigned_to_duo_enterprise?(container) + return true namespace = ::Gitlab::Saas.feature_available?(:gitlab_duo_saas_only) ? container.root_ancestor : nil GitlabSubscriptions::AddOnPurchase @@ -532,6 +533,7 @@ def assigned_to_duo_enterprise?(container) end def assigned_to_duo_pro?(container) + return true namespace = ::Gitlab::Saas.feature_available?(:gitlab_duo_saas_only) ? container.root_ancestor : nil GitlabSubscriptions::AddOnPurchase -
SEED_GITLAB_DUO=1 FILTER=gitlab_duo bundle exec rake db:seed_fuor follow the steps in https://docs.gitlab.com/development/development_seed_files/#seed-project-and-group-resources-for-gitlab-duo\\* -
Visit the project from the output above
-
Go to the project, then navigate to
Analytics Dashboard > GitLab Duo and SDLC trendsin the sidebar menu -
Scroll to the bottom and verify that the chart is rendering correctly
*If you're not seeing any data, try applying the patch in !207492 (comment 2804154619) and re-running the seeder
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 #573972 (closed)
