def record(request): # The rate limiting is done up on the client, but if things go wrong # we can just turn the percentage down to zero. if get_collect_timings(): return django_statsd_record(request) raise PermissionDenied