'returns (result: bool, reason: string or None)
Result is True if an event should be filtered
The reason for filtering is passed along as a string
so that we can store it in metrics'

def should_filter(self, project, data, ip_address=None):

    if (ip_address and (not is_valid_ip(project, ip_address))):
        return (True, 'ip_address')
    release = data.get('release')
    if (release and (not is_valid_release(project, release))):
        return (True, 'release_version')
    message_interface = data.get('sentry.interfaces.Message', {})
    error_message = (message_interface.get('formatted', '') or message_interface.get('message', ''))
    if (error_message and (not is_valid_error_message(project, error_message))):
        return (True, 'error_message')
    for filter_cls in filters.all():
        filter_obj = filter_cls(project)
        if (filter_obj.is_enabled() and filter_obj.test(data)):
            return (True, 'other_filter')
    return (False,)
