Skip to content

Expose VSD distinct contributor counts via GraphQL

What does this MR do and why?

This MR adds the ClickHouse-based contributors count metric to the valueStreamDashboardUsageOverview GraphQL query. It's only available for a few groups on SaaS until the rollout epic is done: &11732

How to set up and validate locally

Enable FFs:

Feature.enable(:clickhouse_data_collection)
Feature.enable(:event_sync_worker_for_click_house)
  1. Ensure that you're on ultimate
  2. Ensure that CH is configured: https://docs.gitlab.com/ee/development/database/clickhouse/clickhouse_within_gitlab.html
  3. For prepping the DB schema you can invoke: bundle exec rake gitlab:clickhouse:migrate
  4. If your GDK is seeded, then you probably have some events records, you can sync them to CH: ClickHouse::EventsSyncWorker.new.perform
  5. Run the following GraphQL query:
{
  group(fullPath: "gitlab-org") {
    id
    valueStreamDashboardUsageOverview(
      identifier: CONTRIBUTORS
      timeframe: {start: "2023-12-01", end: "2023-12-30"}
    ) {
      identifier
      count
      recordedAt
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #432838 (closed)

Edited by Adam Hegyi

Merge request reports

Loading