Improve Redis HLL hardening
We could improve Redis HLL hardening to capture any errors happening in computing the counts for adding them to usage ping
Currently we only capture Gitlab::Redis::HLL.count(keys: keys)
def count_unique_events(event_names:, start_date:, end_date:, context: '')
events = events_for(Array(event_names).map(&:to_s))
yield events if block_given?
aggregation = events.first[:aggregation]
keys = keys_for_aggregation(aggregation, events: events, start_date: start_date, end_date: end_date, context: context)
redis_usage_data { Gitlab::Redis::HLL.count(keys: keys) }
end
In order to not fail usage ping we could capture the full count_unique_events
method
cc @gitlab-org/growth/product_analytics/engineers
Edited by Alina Mihaila