@@ -90,6 +90,8 @@ def rails_env
9090 end
9191
9292 def request_information ( env )
93+ Raygun . log ( 'retrieving request information' )
94+
9395 return { } if env . nil? || env . empty?
9496 {
9597 hostName : env [ "SERVER_NAME" ] ,
@@ -118,6 +120,8 @@ def normalize_raygun_header_key(key)
118120 end
119121
120122 def form_params ( env )
123+ Raygun . log ( 'retrieving form params' )
124+
121125 params = action_dispatch_params ( env ) || rack_params ( env ) || { }
122126 filter_params_with_blacklist ( params , env [ "action_dispatch.parameter_filter" ] )
123127 end
@@ -132,10 +136,12 @@ def rack_params(env)
132136 end
133137
134138 def raw_data ( rack_env )
139+ Raygun . log ( 'retrieving raw data' )
135140 request = Rack ::Request . new ( rack_env )
136141
137142 return unless Raygun . configuration . record_raw_data
138143 return if request . get?
144+ Raygun . log ( 'passed raw_data checks' )
139145
140146 input = rack_env [ 'rack.input' ]
141147
@@ -158,6 +164,7 @@ def filter_custom_data(env)
158164
159165 # see http://raygun.io/raygun-providers/rest-json-api?v=1
160166 def build_payload_hash ( exception_instance , env = { } , user = nil )
167+ Raygun . log ( 'building payload hash' )
161168 custom_data = filter_custom_data ( env ) || { }
162169 exception_custom_data = if exception_instance . respond_to? ( :raygun_custom_data )
163170 exception_instance . raygun_custom_data
@@ -180,6 +187,8 @@ def build_payload_hash(exception_instance, env = {}, user = nil)
180187 configuration_tags = Raygun . configuration . tags
181188 end
182189
190+ Raygun . log ( 'set tags' )
191+
183192 grouping_key = env . delete ( :grouping_key )
184193
185194 configuration_custom_data = Raygun . configuration . custom_data
@@ -189,6 +198,8 @@ def build_payload_hash(exception_instance, env = {}, user = nil)
189198 configuration_custom_data
190199 end
191200
201+ Raygun . log ( 'set custom data' )
202+
192203 error_details = {
193204 machineName : hostname ,
194205 version : version ,
@@ -204,6 +215,8 @@ def build_payload_hash(exception_instance, env = {}, user = nil)
204215 store = ::Raygun ::Breadcrumbs ::Store
205216 error_details [ :breadcrumbs ] = store . stored . map ( &:build_payload ) if store . any?
206217
218+ Raygun . log ( 'set details and breadcrumbs' )
219+
207220 error_details . merge! ( groupingKey : grouping_key ) if grouping_key
208221
209222 user_details = if affected_user_present? ( env )
@@ -213,7 +226,10 @@ def build_payload_hash(exception_instance, env = {}, user = nil)
213226 end
214227 error_details . merge! ( user : user_details ) unless user_details == nil
215228
229+ Raygun . log ( 'set user details' )
230+
216231 if Raygun . configuration . filter_payload_with_whitelist
232+ Raygun . log ( 'filtering payload with whitelist' )
217233 error_details = filter_payload_with_whitelist ( error_details )
218234 end
219235
@@ -224,6 +240,8 @@ def build_payload_hash(exception_instance, env = {}, user = nil)
224240 end
225241
226242 def create_entry ( payload_hash )
243+ Raygun . log ( 'sending payload to api' )
244+
227245 self . class . post ( "/entries" , verify_peer : true , verify : true , headers : @headers , body : JSON . generate ( payload_hash ) )
228246 end
229247
0 commit comments