def is_alive(request): metrics = global_registry().dump_metrics() if 'requests.response-time' in metrics: LOG.info('Is Alive Metrics [request.response-time]: %(requests.response-time)s' % metrics) return HttpResponse('')
def index(request): if request.GET.get('pretty') == 'true': indent = 2 else: indent = None rep = { 'timestamp': datetime.datetime.utcnow().isoformat(), 'metric': global_registry().dump_metrics(), } return JsonResponse(rep, indent=indent)
def index(request): if request.GET.get('pretty') == 'true': indent = 2 else: indent = None rep = { 'timestamp': datetime.datetime.utcnow().isoformat(), 'metric': global_registry().dump_metrics(), } return JsonResponse(rep, indent=indent)
def index(request): if request.GET.get('pretty') == 'true': indent = 2 else: indent = None rep = { 'timestamp': datetime.datetime.utcnow().isoformat(), 'metric': global_registry().dump_metrics(), } LOG.debug('Metrics: %s' % json.dumps(rep, indent=indent)) return JsonResponse(rep, json_dumps_params={'indent': indent})
def index(request): if request.GET.get('pretty') == 'true': indent = 2 else: indent = None rep = { 'timestamp': datetime.datetime.utcnow().isoformat(), 'metric': global_registry().dump_metrics(), } if request.is_ajax(): return JsonResponse(rep, json_dumps_params={'indent': indent}) else: return render("metrics.mako", request, {'metrics': json.dumps(rep['metric']), 'is_embeddable': request.GET.get('is_embeddable', False)})
def index(request): if request.GET.get('pretty') == 'true': indent = 2 else: indent = None rep = { 'timestamp': datetime.datetime.utcnow().isoformat(), 'metric': global_registry().dump_metrics(), } if request.is_ajax(): return JsonResponse(rep, json_dumps_params={'indent': indent}) else: return render( "metrics.mako", request, { 'metrics': json.dumps(rep['metric']), 'is_embeddable': request.GET.get('is_embeddable', False) })