@@ -13,10 +13,10 @@ class ApplicationController < ActionController::Base
1313 skip_forgery_protection if : :saml_callback_path? # HACK: https://github.com/heartcombo/devise/issues/5210
1414
1515 # before_action :authenticate
16- before_action :set_sentry_request_context
16+ before_action :set_error_tracker_request_context
1717 before_action :store_employee_location! , if : :storable_location?
1818 before_action :authenticate_employee!
19- before_action :set_sentry_user_context
19+ before_action :set_error_tracker_user_context
2020 before_action :set_paper_trail_whodunnit
2121 check_authorization unless : :devise_controller?
2222
@@ -71,22 +71,22 @@ def not_found
7171 raise ActionController ::RoutingError , 'Not Found'
7272 end
7373
74- def set_sentry_request_context
75- commit = ENV . fetch ( 'OPENSHIFT_BUILD_COMMIT' , nil )
76- Sentry . set_tags ( commit : ENV . fetch ( 'OPENSHIFT_BUILD_COMMIT' , nil ) ) if commit && ENV [ 'GLITCHTIP_DSN' ]
74+ def set_error_tracker_request_context
75+ commit = Settings . puzzletime . build . commit
76+ project = Settings . puzzletime . run . project
77+ customer = Settings . puzzletime . run . customer
7778
78- if ( project = ENV . fetch ( 'OPENSHIFT_BUILD_NAMESPACE' , nil ) )
79- Sentry . set_tags ( project : project )
80- Sentry . set_tags ( customer : project . split ( '-' ) [ 0 ] )
81- end
79+ ErrorTracker . set_tags ( commit :) if commit
80+ ErrorTracker . set_tags ( project :) if project
81+ ErrorTracker . set_tags ( customer :) if customer
8282 end
8383
84- def set_sentry_user_context
85- return unless ENV [ 'GLITCHTIP_DSN' ]
86-
87- Sentry . set_user ( id : current_user . try ( :id ) ,
88- username : current_user . try ( :shortname ) ,
89- email : current_user . email )
84+ def set_error_tracker_user_context
85+ ErrorTracker . set_user (
86+ id : current_user . try ( :id ) ,
87+ username : current_user . try ( :shortname ) ,
88+ email : current_user . email
89+ )
9090 end
9191
9292 def saml_callback_path?
0 commit comments