Skip to content

Skip migrated redis hll categories in counter

What does this MR do and why?

This MR is follow up to !90237 (merged) It moves all remaining Redis HLL metrics, that were migrated to new instrumentation classes

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

This example shows only one of the migrated categories, however this steps can be follow for any of categories

pry(main)> ::Feature.enable(:use_redis_hll_instrumentation_classes)

pry(main)> Gitlab::UsageDataCounters::HLLRedisCounter.unique_events_data["source_code"]
=> nil

pry(main)> payload = ServicePing::BuildPayload.new.execute

pry(main)> payload[:redis_hll_counters]['source_code']
=> {"design_action_weekly"=>0,
 "merge_request_action_weekly"=>0,
 "wiki_action_weekly"=>0,
 "i_source_code_code_intelligence_weekly"=>0,
 "project_action_weekly"=>0,
 "git_write_action_weekly"=>0,
 "git_write_action_monthly"=>0,
 "i_source_code_code_intelligence_monthly"=>0,
 "merge_request_action_monthly"=>0,
 "project_action_monthly"=>0,
 "design_action_monthly"=>0,
 "wiki_action_monthly"=>0}

pry(main)> ::Feature.disable(:use_redis_hll_instrumentation_classes)

pry(main)> Gitlab::UsageDataCounters::HLLRedisCounter.unique_events_data['source_code']
=> {"wiki_action_weekly"=>0,
 "wiki_action_monthly"=>0,
 "design_action_weekly"=>0,
 "design_action_monthly"=>0,
 "project_action_weekly"=>0,
 "project_action_monthly"=>0,
 "git_write_action_weekly"=>0,
 "git_write_action_monthly"=>0,
 "merge_request_action_weekly"=>0,
 "merge_request_action_monthly"=>0,
 "i_source_code_code_intelligence_weekly"=>0,
 "i_source_code_code_intelligence_monthly"=>0}

pry(main)> payload = ServicePing::BuildPayload.new.execute

pry(main)> payload[:redis_hll_counters]['source_code']
=> {"wiki_action_weekly"=>0,
 "wiki_action_monthly"=>0,
 "design_action_weekly"=>0,
 "design_action_monthly"=>0,
 "project_action_weekly"=>0,
 "project_action_monthly"=>0,
 "git_write_action_weekly"=>0,
 "git_write_action_monthly"=>0,
 "merge_request_action_weekly"=>0,
 "merge_request_action_monthly"=>0,
 "i_source_code_code_intelligence_weekly"=>0,
 "i_source_code_code_intelligence_monthly"=>0}

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 Mikołaj Wawrzyniak

Merge request reports