Installing Airbrake in a Rack app
- Simple to install and configure
- Automatic reporting of unhandled exceptions
- Ignore specific errors and filter out sensitive information
- Append information from Rack requests
View the full list of features on GitHub.
Install with bundler
Add the Airbrake Ruby gem to your Gemfile and run
Invoke the following command from your terminal:
gem install airbrake
To send exceptions to Airbrake from any Rack application, simply
use our Rack
middleware, and configure with your
PROJECT ID and
PROJECT API KEY available
from your project’s settings
require 'airbrake' Airbrake.configure do |c| c.project_id = '<Your PROJECT ID>' c.project_key = '<Your PROJECT API KEY>' end use Airbrake::Rack::Middleware
Note: be aware that by default the library doesn’t filter any parameters, including user passwords. To filter out passwords add a filter.
For advanced configuration options like
ignoring errors with
appending info from Rack
configuring multiple notifiers for
and more please visit the
airbrake GitHub repos.