airbrake/airbrake — Issue #58: AirBrake fails to report exception on EY cluster
Author: ekampf
Created: 2012-02-23 21:48:06+00:00
State: open

I set up a cluster environment on EngineYard with 1 application server (the Application Master)
This means that the Application Master runs HAProxy as well as nginx+unicorn to run rails.
When a request comes it goes to HAproxy which in turn calls Unicorn to get the response.

This breaks the AirBrake reporting because request.local? is TRUE.
The following code is in controller_method.rb:

```ruby
def notify_airbrake(hash_or_exception)
unless airbrake_local_request?
Airbrake.notify(hash_or_exception, airbrake_request_data)
end
end

def airbrake_local_request?
if defined?(::Rails.application.config)
::Rails.application.config.consider_all_requests_local || request.local?
else
consider_all_requests_local || local_request?
end
end
```

Any idea how to properly patch this issue?