Last active
March 30, 2016 21:36
-
-
Save brianr/4199634 to your computer and use it in GitHub Desktop.
basic Rollbar usage with sinatra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'rollbar' | |
configure do | |
Rollbar.configure do |config| | |
config.access_token = 'aaaabbbbccccddddeeeeffff00001111' | |
config.environment = 'sinatra-test' | |
end | |
end | |
get '/' do | |
begin | |
foo = bar | |
rescue => e | |
Rollbar.report_exception(e) | |
end | |
Rollbar.report_message("test message") | |
"Hello world!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to add the following to automatically report every exception in production: