Module: Gitlab::UsageDataCounters::QuickActionActivityUniqueCounter

Defined in:
lib/gitlab/usage_data_counters/quick_action_activity_unique_counter.rb

Class Method Summary collapse

Class Method Details

.track_unique_action(name, args:, user:) ⇒ Object

Tracks the quick action with name ‘name`. `args` is expected to be a single string, will be split internally when necessary.



9
10
11
12
13
14
15
16
# File 'lib/gitlab/usage_data_counters/quick_action_activity_unique_counter.rb', line 9

def track_unique_action(name, args:, user:)
  return unless user

  args ||= ''
  name = prepare_name(name, args)

  Gitlab::UsageDataCounters::HLLRedisCounter.track_event(:"i_quickactions_#{name}", values: user.id)
end