Skip to content

Commit

Permalink
better explanation of ignored environments and classes
Browse files Browse the repository at this point in the history
  • Loading branch information
shime committed Jun 26, 2013
1 parent fb042d7 commit 5a4d08b
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,8 @@ Then from your project's RAILS_ROOT, and in your development environment, run:
bundle install
rails generate airbrake --api-key your_key_here

That's it!

The generator creates a file under `config/initializers/airbrake.rb` configuring Airbrake with your API key. This file should be checked into your version control system so that it is deployed to your staging and production environments.

The default behaviour of the gem is to only operate in Rails environments that are NOT **development**, **test** & **cucumber**.

You can change this by altering this array:

config.development_environments = ["development", "test", "cucumber", "custom"]

Set it to empty array and it will report errors on all environments.


### Rails 2.x

Add the airbrake gem to your app. In config/environment.rb:
Expand All @@ -61,6 +50,34 @@ every server you deploy to has the gem installed or your application won't start

The generator creates a file under `config/initializers/airbrake.rb` configuring Airbrake with your API key. This file should be checked into your version control system so that it is deployed to your staging and production environments.

Ignored exceptions
------------------------

Exceptions raised from Rails environments named **development**, **test** or **cucumber** will be ignored by default.

You can clear the list of ignored environments with this setting:

config.development_environments = []

List of ignored exception classes includes:

ActiveRecord::RecordNotFound
ActionController::RoutingError
ActionController::InvalidAuthenticityToken
CGI::Session::CookieStore::TamperedWithCookie
ActionController::UnknownHttpMethod
ActionController::UnknownAction
AbstractController::ActionNotFound
Mongoid::Errors::DocumentNotFound

You can alter this list with

config.ignore_only = []

which will cause none of the exception classes to be ignored.

Check the [wiki](https://github.com/airbrake/airbrake/wiki/Customizing-your-airbrake.rb) for more customization options.

Supported frameworks
------------------------

Expand Down

0 comments on commit 5a4d08b

Please sign in to comment.