diff --git a/app/controllers/find/results_controller.rb b/app/controllers/find/results_controller.rb index 620cf3a638..509561e3bc 100644 --- a/app/controllers/find/results_controller.rb +++ b/app/controllers/find/results_controller.rb @@ -2,6 +2,7 @@ module Find class ResultsController < ApplicationController + before_action :set_sentry_context before_action :render_feedback_component def index @@ -23,5 +24,12 @@ def index def track_search_results(number_of_results:, course_codes:) Find::ResultsTracking.new(request:).track_search_results(number_of_results:, course_codes:) end + + def set_sentry_context + Sentry.set_context('Request Headers', { + Referer: request.headers['Referer'] + }) + Sentry.set_context('Query Parameters', request.query_parameters) + end end end