Skip to content

Add ClickHouse enabled check for analytics reports

What does this MR do and why?

Add Clickhouse application setting availability check to analytics reports. The application setting was added with !144918 (merged) and is being used here for contribution analytics and VSD contributors count.

The frontend and documentation will be added with !145022 (merged).

related to #432191 (closed)

BEFORE MERGE

The field use_clickhouse_for_analytics_reports is false by default. API can be used to turn it on in production before merging otherwise, ClickHouse will be disabled.

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.

How to set up and validate locally

  1. Make sure ClickHouse is configured on your instance.
  2. Turn :clickhouse_data_collection feature flag on
  3. Go to a group VSD and see contributor count metric won't be present.
  4. Enable the use_clickhouse_for_analytics using console or API
`curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/application/settings?use_clickhouse_for_analytics=true"`

5.Visit a group VSD again and the contributor count metric should be present.

Edited by Felipe Artur

Merge request reports