Migrate commit_change_to_ciconfigfile to internal events
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
Before | After |
---|---|
How to set up and validate locally
- Start your gdk
- Start the internal events monitor with
rails runner scripts/internal_events/monitor.rb commit_change_to_ciconfigfile
- Commit a change to a CI-file in one of your repositories
- A
commit_change_to_ciconfigfile
event should be shown in the monitor - The six metrics shown in the monitor should all increase by 1.
- A
- Commit another change as the same user to a ci-file in one of your repositories:
- A
commit_change_to_ciconfigfile
event should be shown in the monitor - The four Unique/RedisHLL metrics shown in the monitor should not increase.
- The total count metrics should increase
- A
-
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