Make it possible to add overrides for RedisHLL keys
What does this MR do and why?
Related to #415139 (closed)
Make it possible to add overrides for RedisHLL keys. We want this on master for both the linked issue and Redis total count update, as discussed here.
This should not change any of the existing logic, but build fundamentals for future MRs.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
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
Make sure that everything works like it did:
- Choose a RedisHLL event name and try reading its value, for example:
Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'g_compliance_dashboard', start_date: Date.yesterday, end_date: Date.tomorrow + 7.days)
- Try triggering the chosen event, for example:
Gitlab::UsageDataCounters::HLLRedisCounter.track_event('g_compliance_dashboard', values: SecureRandom.uuid)
- Read the event's value again using the command from point 1, eg:
Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'g_compliance_dashboard', start_date: Date.yesterday, end_date: Date.tomorrow + 7.days)
. Its value should be equal to the value retrieved in point1
, incremented by 1 for each time#track_event
has been called.
Edited by Michał Wielich