@@ -31,7 +31,7 @@ def self.service(svc)
3131 status 400
3232 "Service Timeout"
3333 rescue Object => boom
34- report_exception svc , data , boom
34+ report_exception svc , data , boom , params [ :event ] , payload
3535 status 500
3636 "ERROR"
3737 end
@@ -56,7 +56,7 @@ def parse_payload(json)
5656 # exception - An Exception instance.
5757 #
5858 # Returns nothing.
59- def report_exception ( service_class , service_data , exception )
59+ def report_exception ( service_class , service_data , exception , event , payload )
6060 backtrace = Array ( exception . backtrace ) [ 0 ..500 ]
6161
6262 data = {
@@ -67,8 +67,10 @@ def report_exception(service_class, service_data, exception)
6767 'message' => exception . message [ 0 ..254 ] ,
6868 'backtrace' => backtrace . join ( "\n " ) ,
6969 'rollup' => Digest ::MD5 . hexdigest ( exception . class . to_s + backtrace [ 0 ] ) ,
70- 'service' => service_class . to_s
70+ 'service' => service_class . to_s ,
7171 }
72+ data [ 'event' ] = event if event
73+ data [ 'payload' ] = payload . inspect if payload
7274
7375 if exception . kind_of? ( Service ::Error )
7476 if exception . original_exception
0 commit comments