Skip to content

Add runner fleet dashboard visit metric

What does this MR do and why?

This MR adds a metric and events to track unique runner fleet dashboard visits per user.

  • Changelog: added
  • EE: true

Part of #467284 (closed)

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.

n/a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Follow setup steps from https://docs.gitlab.com/ee/development/internal_analytics/internal_event_instrumentation/local_setup_and_debugging.html

  2. Visit http://gdk.test:3000/admin/runners/dashboard. Check that the redis_hll_counters.count_distinct_user_id_from_user_viewed_admin_runner_fleet_dashboard_monthly metric has increased by 1.

    require_relative 'spec/support/helpers/service_ping_helpers.rb'
    
    metrics = %w[redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_monthly redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_weekly redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_monthly redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_weekly]; metrics.each { |m| puts "#{m}: #{ServicePingHelpers.get_current_usage_metric_value(m)}" }; nil
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_monthly: 0
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_weekly: 0
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_monthly: 1
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_weekly: 1
    => nil
  3. Visit http://gdk.test:3000/groups/gitlab-org/-/runners/dashboard. Check that the redis_hll_counters.count_distinct_user_id_from_user_viewed_group_runner_fleet_dashboard_monthly metric has increased by 1.

    metrics = %w[redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_monthly redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_weekly redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_monthly redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_weekly]; metrics.each { |m| puts "#{m}: #{ServicePingHelpers.get_current_usage_metric_value(m)}" }; nil
    
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_monthly: 1
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_group_weekly: 1
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_monthly: 1
    redis_hll_counters.count_distinct_user_id_from_view_runner_fleet_dashboard_pageload_on_instance_weekly: 1
    => nil
Edited by Pedro Pombeiro

Merge request reports