Class: Google::Cloud::ErrorReporting::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/google/cloud/error_reporting/rails.rb

Overview

Railtie

Google::Cloud::ErrorReporting::Railtie automatically add the Middleware to Rack in a Rails environment. It will automatically capture Exceptions from the Rails app and report them to the Stackdriver Error Reporting service.

The Middleware is only added when certain conditions are met. See Railtie.use_error_reporting? for detail.

When loaded, the Middleware will be inserted after ActionDispatch::DebugExceptions or ActionDispatch::ShowExceptions Middleware, which allows it to intercept and handle all Exceptions without interfering with Rails's normal error pages. See the Configuration Guide on how to configure the Railtie and Middleware.