Add a new danger rule to prevent adding new metrics to UsageData class
requested to merge 377341-add-a-new-danger-rule-to-prevent-adding-new-metrics-to-usagedata-class into master
What does this MR do and why?
Since we deprecated adding new metrics directly to usage_data.rb
we use instrumentation classes instead.
To simplify Product Intelligence reviews we expect that it would be beneficial to add a new Danger rule to warn developers if they add new code to usage_data
.
Adds a warning to the MR if any insertions has been made to lib/gitlab/usage_data.rb
.
Screenshots or screen recordings
How to set up and validate locally
!111577 (closed) demonstrates what happens when you add code to usage_data.rb
.
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 #377341 (closed)
Edited by Jonas Larsen