Always update Redis metrics
What does this MR do and why?
We want to make sure we are updating metrics in Redis independent of if they will actually me sent to GitLab as part of the Service Ping payload.
This will allow admins of self-managed instances to access the metrics themselves which is not possible without opting in to Service Ping at the moment.
How to set up and validate locally
-
Disable Service Ping (guide)
-
RedisHLL
- Check the current value of this weeks RedisHLL counter by running
gdk redis-cli PFCOUNT "{hll_counters}_unique_active_user-$(date +%Y)-$(date +%U)"
- Try to increment the value by running
Gitlab::UsageDataCounters::HLLRedisCounter.track_event('unique_active_user', values: rand(1..999999))
ingdk rails console
. - Validate that the value increased by running the command from 1) again
- Check the current value of this weeks RedisHLL counter by running
-
Redis
- Check the current value of a Redis counter by running
gdk redis-cli GET "WEB_IDE_VIEWS_COUNT"
- Try to increment the value by running
Gitlab::UsageDataCounters::WebIdeCounter.increment_views_count
ingdk rails console
. - Validate that the value increased by running the command from 1) again
- Check the current value of a Redis counter by running
If you follow the above steps on master
you will see that the value is not incremented in the last steps.
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.
Edited by Jonas Larsen