diff options
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r-- | app/controllers/search_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index fc53b5fafaf..56b6a5201e7 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -114,4 +114,15 @@ class SearchController < ApplicationController Gitlab::UsageDataCounters::SearchCounter.count(:navbar_searches) end + + def append_info_to_payload(payload) + super + + # Merging to :metadata will ensure these are logged as top level keys + payload[:metadata] || {} + payload[:metadata]['meta.search.group_id'] = params[:group_id] + payload[:metadata]['meta.search.project_id'] = params[:project_id] + payload[:metadata]['meta.search.search'] = params[:search] + payload[:metadata]['meta.search.scope'] = params[:scope] + end end |