1# frozen_string_literal: true 2 3module IncidentManagement 4 module UsageData 5 include Gitlab::Utils::UsageData 6 7 def track_incident_action(current_user, target, action) 8 return unless target.incident? 9 10 track_usage_event(:"incident_management_#{action}", current_user.id) 11 end 12 13 # No-op as optionally overridden in implementing classes. 14 # For use to provide checks before calling #track_incident_action. 15 def track_event 16 end 17 end 18end 19