Skip to content

Migrate commit_change_to_ciconfigfile to internal events

Sebastian Rehm requested to merge 429942-commit-ci-config-internal-events into master

What does this MR do and why?

  • Migrates the event that is fired when a commit changes the ci config to Internal events to allow for namespace level tracking on GitLab.com
  • Adds total count metrics for the event

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

Screenshot_2024-09-23_at_16.00.42

Before After

How to set up and validate locally

  1. Start your gdk
  2. Start the internal events monitor with rails runner scripts/internal_events/monitor.rb commit_change_to_ciconfigfile
  3. Commit a change to a CI-file in one of your repositories
    1. A commit_change_to_ciconfigfile event should be shown in the monitor
    2. The six metrics shown in the monitor should all increase by 1.
  4. Commit another change as the same user to a ci-file in one of your repositories:
    1. A commit_change_to_ciconfigfile event should be shown in the monitor
    2. The four Unique/RedisHLL metrics shown in the monitor should not increase.
    3. The total count metrics should increase
  5. Alternative: If you want to only test the metrics you can also trigger the event within the console via: Gitlab::InternalEvents.track_event('commit_change_to_ciconfigfile', user: User.all.sample) or similar

Related to #429942

Edited by Sebastian Rehm

Merge request reports

Loading