def _batch_report(cls, request):
        """
        Report the collected custom metrics to New Relic.
        """
        if not newrelic:
            return
        metrics_cache = cls._get_metrics_cache()
        try:
            newrelic.agent.add_custom_parameter('user_id', request.user.id)
        except AttributeError:
            pass
        for key, value in metrics_cache.data.items():
            newrelic.agent.add_custom_parameter(key, value)