Skip to content

Add periods handling to Redis metrics generator

Michał Wielich requested to merge michold-redis-generator into master

What does this MR do and why?

Related to #411264 (closed)

We have added 7d and 28d time frames handling for the TotalCountMetric class [used for internal events], and now we want to introduce their handling into our metric generator too.

The generator differentiates between TotalCountMetric [aka total] and RedisHLLMetric [aka unique] metric types by checking whether --unique option has been passed when initializing it.

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

To test the generator, run the command listed here and modify its options, making sure to include no --unique option while using 7d and/or 28d time_frame, for example:

bundle exec rails generate gitlab:analytics:internal_events \
--time_frames=28d all \
--group=project_management \
--stage=plan \
--section=dev \
--event=project_created \
--mr=https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121544

And answer the generator's prompts.

Then, make sure that the new metric file(s) [their paths will be listed by the generator] include all necessary data, eg. have the TotalCountMetric set as instrumentation_class.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Michał Wielich

Merge request reports

Loading