add basic prometheus metrics with prometheus_flask_exporter

This commit is contained in:
Bob Belnap
2022-08-01 09:45:47 -04:00
parent 390fe24ea4
commit d5008893f7
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -23,6 +23,7 @@ from flask import (
url_for,
)
from werkzeug.middleware.proxy_fix import ProxyFix
from prometheus_flask_exporter import PrometheusMetrics
from cellxgene_gateway import env, flask_util
from cellxgene_gateway.backend_cache import BackendCache
@@ -34,9 +35,13 @@ from cellxgene_gateway.filecrawl import render_item_source
from cellxgene_gateway.process_exception import ProcessException
from cellxgene_gateway.prune_process_cache import PruneProcessCache
from cellxgene_gateway.util import current_time_stamp
from cellxgene_gateway import __version__
app = Flask(__name__)
metrics = PrometheusMetrics(app)
metrics.info('app_info', 'Application info', version=__version__)
item_sources = []
default_item_source = None