Let Internal Events Tracking generator work with existing events
What does this MR do and why?
The Internal Events Tracking generator doesn't work if the provided event already exist.
It is a common use-case to add multiple metrics for the same event so that should be fixed.
How to set up and validate locally
- Switch to
master
- Run the following command
bin/rails g gitlab:analytics:internal_events \
--time_frames=7d \
--group=project_management \
--stage=plan --section=dev \
--event=ci_templates_unique \
--unique=user.id \
--mr=https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1337
- Watch it fail
⁉ - Switch to this branch
- Fill out the description for the metric definition with this text:
Why did the text cross the road? To hit fifty chars!
- Verify that only
config/metrics/counts_7d/count_distinct_user_id_from_ci_templates_unique_7d.yml
was created
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 #415446 (closed)
Edited by Jonas Larsen