Add Extra Parameters to Every Error

Step 1: from your root directory find out where your gems are installed We are looking for the
INSTALLATION DIRECTORY where your AirBrake gem is installed

$ gem env
#returns more than this but we want the Installation directory path ( I am using RVM )
#You will see the following line:
  - INSTALLATION DIRECTORY: /Users/Admin/.rvm/gems/ruby-1.9.3-p194@testerAir

Step 2: edit the notice.rb file on line 90 with your favorite text editor using the earlier path for your gems and adding /gems/airbrake-3.1.1/lib/airbrake/notice.rb to the end of the INSTALLATION DIRECTORY path:

$ vim /Users/Admin/.rvm/gems/ruby-1.9.3-p194@testerAir/gems/airbrake-3.1.1/lib/airbrake/notice.rb

Set parameters that you want to appear on every error by adding information in the brackets {} in lib/airbrake/notice.rbon line 90

I have added the following: "Number Of Users" => User.all.count on line 90


This will include the specified parameters in Every Error: