module Airbrake
This module reopens the original Airbrake
module from airbrake-ruby and adds integration specific methods.
We use Semantic Versioning v2.0.0 More information: semver.org/
Constants
- AIRBRAKE_VERSION
Public Class Methods
add_rack_builder(&block)
click to toggle source
Attaches a callback (builder) that runs every time the Rack
integration reports an error. Can be used to attach additional data from the Rack
request.
@example Adding remote IP from the Rack
environment
Airbrake.add_rack_builder do |notice, request| notice[:params][:remoteIp] = request.env['REMOTE_IP'] end
@yieldparam notice [Airbrake::Notice] notice that will be sent to Airbrake
@yieldparam request [Rack::Request] current rack request @yieldreturn [void] @return [void] @since 5.1.0
# File lib/airbrake.rb, line 48 def add_rack_builder(&block) Airbrake::Rack::NoticeBuilder.add_builder(&block) end
Public Instance Methods
unknown()
click to toggle source
Adds HTTP request parameters.
# File lib/airbrake/rack/notice_builder.rb, line 92 add_builder do |notice, request| notice[:params] = request.params