Reputation: 2110
I am using the Airbrake gem to report errors in my rails application.
Is it possible to not have reports sent if it has a certain IP address, I would like to ignore the following:
213.233.458.*
I have looked at the docs and noticed a method called ignore_by_filters but wondering how I would employ this to ignore by IP address.
Does the exception_data variable hold information on the requesting IP or any other way to access it?
Upvotes: 1
Views: 147
Reputation: 1394
You could just use:
Airbrake.notify e unless request.remote_ip == "ip"
request.remote_ip can be accessed in the controller, so you could just pass this to the model if needed.
Upvotes: 1