fiveruns-dash-rails 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/fiveruns/dash/recipes/rails.rb +20 -9
- data/version.yml +1 -1
- metadata +1 -1
@@ -46,20 +46,31 @@ Fiveruns::Dash.register_recipe :rails, :url => 'http://dash.fiveruns.com' do |re
|
|
46
46
|
end
|
47
47
|
|
48
48
|
recipe.add_exceptions_from 'ActionController::Base#perform_action_without_rescue' do |ex, controller|
|
49
|
-
|
49
|
+
info = {:name => "#{ex.class.name} in #{controller.class.name}##{controller.params[:action]}"}
|
50
50
|
begin
|
51
51
|
session_data = controller.request.session.instance_variable_get("@data")
|
52
|
+
info[:session] = Fiveruns::Dash::Rails::Hash.clean(session_data).to_json
|
52
53
|
rescue Exception => e
|
53
|
-
Fiveruns::Dash.logger.warn "Could not
|
54
|
+
Fiveruns::Dash.logger.warn "Could not dump session data for exception: #{e.message}"
|
55
|
+
nil
|
54
56
|
end
|
55
|
-
|
56
|
-
|
57
|
-
:
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
begin
|
58
|
+
request_data = { :url => controller.request.url, :params => controller.params.inspect }
|
59
|
+
info[:request] = Fiveruns::Dash::Rails::Hash.clean(request_data).to_json
|
60
|
+
rescue Exception => e
|
61
|
+
Fiveruns::Dash.logger.error "Could not dump request data for exception: #{e.message}"
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
begin
|
65
|
+
header_data = controller.request.headers
|
66
|
+
info[:headers] = Fiveruns::Dash::Rails::Hash.clean(header_data).to_json
|
67
|
+
rescue Exception => e
|
68
|
+
Fiveruns::Dash.logger.error "Could not dump header data for exception: #{e.message}"
|
69
|
+
nil
|
70
|
+
end
|
71
|
+
info
|
61
72
|
end
|
62
|
-
|
73
|
+
|
63
74
|
# Same classes as the exception_notification plugin
|
64
75
|
IGNORE = [ActiveRecord::RecordNotFound, ActionController::RoutingError, ActionController::UnknownController, ActionController::UnknownAction]
|
65
76
|
|
data/version.yml
CHANGED