summaryrefslogtreecommitdiff
path: root/lib/gitlab/usage_data_counters/hll_redis_counter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/usage_data_counters/hll_redis_counter.rb')
-rw-r--r--lib/gitlab/usage_data_counters/hll_redis_counter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/usage_data_counters/hll_redis_counter.rb b/lib/gitlab/usage_data_counters/hll_redis_counter.rb
index 68ae239debb..336bef081a6 100644
--- a/lib/gitlab/usage_data_counters/hll_redis_counter.rb
+++ b/lib/gitlab/usage_data_counters/hll_redis_counter.rb
@@ -127,11 +127,15 @@ module Gitlab
return unless Gitlab::CurrentSettings.usage_ping_enabled?
event = event_for(event_name)
- raise UnknownEvent, "Unknown event #{event_name}" unless event.present?
+ Gitlab::ErrorTracking.track_and_raise_for_dev_exception(UnknownEvent.new("Unknown event #{event_name}")) unless event.present?
return unless feature_enabled?(event)
Gitlab::Redis::HLL.add(key: redis_key(event, time, context), value: values, expiry: expiry(event))
+ rescue => e
+ # Ignore any exceptions unless is dev or test env
+ # The application flow should not be blocked by erros in tracking
+ Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e)
end
# The array of valid context on which we allow tracking