Skip to content

Using Airbrake in Sinatra apps

shime edited this page Oct 27, 2012 · 2 revisions

Using airbrake in a Sinatra app is just like a Rack app:

require 'sinatra'
require 'airbrake'

Airbrake.configure do |config|
  config.api_key = 'my api key'
end

use Airbrake::Rack

get '/' do
  raise "Sinatra has left the building"
end