Use MetricDefinition.all in HLLRedisCounter.load_events call
What does this MR do and why?
This MR changes HLLRedisCounter.load_events
to use Gitlab::Usage::MetricDefinition.all
method (which has pre-cached definitions) to extract events. not_removed
method has extra method call (index_by
) which is unnecessary.
Also removing opting out for all
method matches the way we consume definitions in https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/internal_events/event_definitions.rb#L47-47 which simplifies keeping metric reloading https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/internal_events/event_definitions.rb#L39-39 under control (see !127089 (comment 1479247048))
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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 #418857 (closed) and #299453 (closed)