Skip to content

Add "Contributor count" metric to Value Streams Dashboard

Rudy Crespo requested to merge 433353-vsd-add-unique-contributors-metric into master

What does this MR do and why?

Adds the Clickhouse-based "Contributor count" metric to the comparison panel in the Value Streams Dashboard. It is only available at the group level and when Clickhouse has been enabled.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

View Before After
Built-in VSD Screenshot 2024-01-17 at 2.54.08 PM.png Screenshot 2024-01-17 at 2.52.50 PM.png
Dynamic VSD Screenshot 2024-01-17 at 2.54.37 PM.png Screenshot 2024-01-17 at 2.51.14 PM.png

How to set up and validate locally

Enable these feature flags:

# enable Clickhouse
Feature.enable(:clickhouse_data_collection)
Feature.enable(:event_sync_worker_for_click_house)

# enable group dashboards and dynamic group VSD
Feature.enable(:group_analytics_dashboards)
Feature.enable(:group_analytics_dashboard_dynamic_vsd)
  1. Please make sure that you have a GitLab Ultimate license.
  2. Ensure that Clickhouse is configured: https://docs.gitlab.com/ee/development/database/clickhouse/clickhouse_within_gitlab.html
    • For prepping the DB schema you can invoke: bundle exec rake gitlab:clickhouse:migrate
  3. FILTER=productivity_analytics SEED_PRODUCTIVITY_ANALYTICS=1 bundle exec rake db:seed_fu
  4. Visit the group from the output above, get its ID and run the following seeder: GROUP_ID={GROUP_ID} SEED_VSD_COUNTS=1 FILTER=vsd_overview_counts bundle exec rake db:seed_fu
  5. In your rails console, enter the following: ClickHouse::EventsSyncWorker.new.perform
  6. Visit your group's VSD and verify that the new metric appears in the comparison panel: http://gdk.test:3443/groups/{GROUP_PATH}/-/analytics/dashboards/value_streams_dashboard
    • To verify in the built-in VSD as well, disable the group_analytics_dashboard_dynamic_vsd feature flag and refresh the page

Related to #433353 (closed)

Edited by Rudy Crespo

Merge request reports