Draft: PoC: Implement tracking of govern-related page visits
What does this MR do and why?
This MR is a PoC for a spike, where we investigated how to implement aggregated tracking of page visits for govern-related pages. See also #414757 (comment 1445737289) for more context.
How to set up and validate locally
- Visit one of the pages or perform any of the actions described in Govern SMAU Metric (#414757 - closed)
- In the
rails console
, check for a non-zero counter value for the aggregated metric:Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'users_visiting_govern_pages', start_date: Date.current.beginning_of_week, end_date: Date.current.next_week)
- You run the service ping worker with
GitlabServicePingWorker.new.perform('triggered_from_cron' => false)
- Check for the
weekly
andmonthly
aggregated metric:[5] pry(main)> RawUsageData.last.payload['redis_hll_counters']['govern'] => {"users_visiting_govern_pages_weekly"=>5, "users_visiting_govern_pages_monthly"=>5}
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 #415677 (closed)
Edited by Martin Čavoj