Migrate i_code_review_saved_replies total counts to Internal Events
What does this MR do and why?
The following metrics never reported any values.
counts.i_code_review_saved_replies_count_use
counts.i_code_review_saved_replies_count_create
counts.i_code_review_saved_replies_use_in_mr
counts.i_code_review_saved_replies_use_in_other
They were implemented in anticipation of total counters getting added to Internal Events Tracking.
This MR updates the metric definition so that they will report the total counts.
How to set up and validate locally
- Copy this POC of a Internal Events Tracking to e.g.
/tmp/monitor.rb
- Start the monitor
bin/rails runner /tmp/monitor.rb i_code_review_saved_replies_use i_code_review_saved_replies_create i_code_review_saved_replies_use_in_mr i_code_review_saved_replies_use_in_other
- Start the Rails console:
gdk rails console
- Trigger the different events and check that the total count metrics gets updated in the monitor
Gitlab::InternalEvents.track_event("i_code_review_saved_replies_use", user: User.first)
Gitlab::InternalEvents.track_event("i_code_review_saved_replies_create", user: User.first)
Gitlab::InternalEvents.track_event("i_code_review_saved_replies_use_in_mr", user: User.first)
Gitlab::InternalEvents.track_event("i_code_review_saved_replies_use_in_other", user: User.first)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #412999 (closed)
Edited by Sebastian Rehm