Skip to content

Migrate value_streams_dashboard to internal events

Michał Wielich requested to merge michold-migrate-vs-total into master

What does this MR do and why?

Related to gitlab-org/analytics-section/analytics-instrumentation/internal#702 (moved)

This migrates the analytics_counts_visits.g_metrics_comparison_page total count metric to Internal Events, while keeping the original Redis key. Instead of migrating the key to the new format in TotalCountMetric, the new key is aliased in a YAML file and points to the old one, so that the count continues in the old key and we can keep the past count.

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.

Before After

How to set up and validate locally

  1. Checkout master and fire the event a few times (visit the value_streams_dashboard view).
  2. Run in console and note the value:
definition = Gitlab::Usage::MetricDefinition.definitions['analytics_counts_visits.g_metrics_comparison_page']
Gitlab::Usage::Metric.new(definition).with_value
  1. Enable the feature: Feature.enable(:group_analytics_dashboard_dynamic_vsd)
  2. Checkout MR branch, reload! the console and run the previous point's code in the console again. The value should be identical.
  3. Fire the event a few more times and make sure that the value got incremented.
Edited by Michał Wielich

Merge request reports