Created
July 13, 2015 20:54
-
-
Save jondeandres/040274f21c64968a0c50 to your computer and use it in GitHub Desktop.
Monkey patch Rollbar report()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IGNORED_IPS = [] | |
class Rollbar::Notifier | |
def report(*args) | |
return if ignore_request? | |
super(*args) | |
end | |
def ignore_request? | |
data = Thread.current[:'_rollbar.rails.request_data'] | |
IGNORED_IPS.include?(data[:user_ip]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment