Skip to content

Add runner creation metrics

What does this MR do and why?

This MR adds the following runner creation events/metrics:

  • Events:
    • provision_{group|project}_runner_on_google_cloud
    • click_create_{group|project}_runner_button
    • click_view_runners_button_in_new_{group|project}_runner_form
  • Metrics:
    • redis_hll_counters.count_distinct_user_id_from_click_create_{group|project}_runner_button_weekly
    • redis_hll_counters.count_distinct_user_id_from_click_view_runners_button_in_new_{group|project}_runner_form_weekly
    • redis_hll_counters.count_distinct_user_id_from_click_create_{group|project}_runner_button_monthly
    • redis_hll_counters.count_distinct_user_id_from_click_view_runners_button_in_new_{group|project}_runner_form_monthly
    • redis_hll_counters.count_distinct_user_id_from_provision_{group|project}_runner_on_google_cloud_weekly
    • redis_hll_counters.count_distinct_user_id_from_provision_{group|project}_runner_on_google_cloud_monthly

Changelog: added EE: true

Closes #440235 (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.

header header
Snowplow micro UI image
rails runner scripts/internal_events/monitor.rb click_view_runners_button_in_new_runner_form image

How to set up and validate locally

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

  1. Enable the FF on the console:

    Feature.enable(:google_cloud_runner_provisioning)
  2. Ensure you have an Ultimate license applied to your GDK.

  3. Simulate a SaaS instance:

    export GITLAB_SIMULATE_SAAS=1
  4. Follow the guide in https://docs.gitlab.com/ee/development/internal_analytics/internal_event_instrumentation/local_setup_and_debugging.html

  5. Open http://localhost:9090/micro/ui in your browser and check that events are created as you go along.

  6. Go to a group and create a new cloud runner (select Google Cloud as the platform). (click_create_group_runner_button and provision_group_runner_on_google_cloud should be recorded).

  7. Once the runner is created, go back to the runners list by clicking on the button at the bottom (click_view_runners_button_in_new_group_runner_form event should be recorded)

Merge request reports