Shows exception uuids and links to them on error pages for easier support
gem install rollbar-user_informer- Adds rack middleware
Rollbar::UserInformer::Middlewarethat inserts a link to Rollbar in error pages. - Allows customization of error message with
Rollbar::UserInformer.user_information(replaces{{error_uuid}}with the error uuid from Rollbar.) - Allows customizing error page placeholder
Rollbar::UserInformer.user_information_placeholder, must match what is on the error page (default is<!-- ROLLBAR ERROR -->).
# Gemfile
gem 'rollbar-user_informer'
# config/initializers/rollbar.rb
Rollbar.configure do |config|
...
end
Rollbar::UserInformer.user_information = <<~HTML
<br/><br/>
<a href="#{Rollbar.notifier.configuration.web_base}/instance/uuid?uuid={{error_uuid}}">
View error {{error_uuid}} on Rollbar
</a>
HTML# public/500.html
<body>
<div class="dialog">
<h1>We're sorry, but something went wrong.</h1>
</div>
<p>
If you are the application owner check the logs for more information.
<!-- ROLLBAR ERROR -->
</p>
</body> Ryan Gurney
ryan.a.gurney@gmail.com
License: MIT
