Skip to content

Instantly share code, notes, and snippets.

@jondeandres
Created July 13, 2015 20:54
Show Gist options
  • Save jondeandres/040274f21c64968a0c50 to your computer and use it in GitHub Desktop.
Save jondeandres/040274f21c64968a0c50 to your computer and use it in GitHub Desktop.
Monkey patch Rollbar report()
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