Class: AppMonitor::EventNotification
- Inherits:
-
Object
- Object
- AppMonitor::EventNotification
- Defined in:
- lib/appmonitor/event_notification.rb
Class Method Summary collapse
- .build_exception_hash(exception, request, options = {}) ⇒ Object
- .build_rake_event(exception, options) ⇒ Object
Class Method Details
.build_exception_hash(exception, request, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/appmonitor/event_notification.rb', line 9 def self.build_exception_hash(exception, request, = {}) params = request.params {:klass => params[:controller], :method => params[:action], :message => exception..inspect, :session => request.session.to_hash, :stack_trace => exception.backtrace.join("\n"), :params => request.filtered_parameters, :url => request.original_url, :ip_address => request.remote_ip, :time => Time.now.to_i.to_s, :environment => Rails.env || ''} end |
.build_rake_event(exception, options) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/appmonitor/event_notification.rb', line 18 def self.build_rake_event(exception, ) rake_called_name = [:rake_command_line].split(":", 2) rake_namespace = rake_called_name.first {method: [:rake_command_line], time: Time.now.to_i.to_s, message: exception..inspect, stack_trace: exception.backtrace.join("\n"), klass: rake_namespace, environment: Rails.env || ''} end |