Low commit activity in last 3 years
No release in over a year
Show exception ids on error pages so users or support can track them down faster
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 13.0
>= 0
>= 5.0.0, < 7.1.0
 Project Readme

Show rails exception ids on error pages and headers, so users or support can track them down faster

Example

Install

gem install airbrake-user_informer

Usage

# Gemfile
gem 'airbrake'
gem 'airbrake-user_informer'

# config/initializers/airbrake.rb
Airbrake.configure do |config|
  ... regular config ...
end

# optional: customize placeholder ... default is '<!-- AIRBRAKE ERROR -->'
Airbrake.user_information_placeholder = '<!-- AIRBRAKE ERROR -->'

Airbrake.user_information = # replaces user_information_placeholder on 500 pages
  "<br/><br/>Error number: <a href='https://airbrake.io/locate/{{error_id}}'>{{error_id}}</a>"

# public/500.html
<!-- AIRBRAKE ERROR -->

Details

  • adds a new middleware to wait for exception to report (max 1s) and render error id + adds Error-Id header
  • modifies Airbrake::Rack::Middleware to store the exceptions it sends to airbrake
  • adds Airbrake.user_information accessor for configuration

Development

  • run tests: bundle && rake default integration (travis cannot run integration tests)
  • example app: cd example && bundle && rails s then go to localhost:3000 or localhost:3000/error

Author

Michael Grosser
michael@grosser.it
License: MIT
Build Status