Wrap API and registry requests with common metric timings

Record response times, codes, and rollup non-2XX responses.
This commit is contained in:
Matt Jibson 2015-08-12 11:58:04 -04:00
parent b04c190ca0
commit b483209862
4 changed files with 48 additions and 4 deletions

View file

@ -1,10 +1,13 @@
from flask import Blueprint, make_response
from app import metric_queue
from endpoints.decorators import anon_protect, anon_allowed
from util.saas.metricqueue import time_blueprint
v1_bp = Blueprint('v1', __name__)
time_blueprint(v1_bp, metric_queue)
# Note: This is *not* part of the Docker index spec. This is here for our own health check,
# since we have nginx handle the _ping below.