|
@@ -7,6 +7,7 @@ from .config import BaseConfig
|
|
|
from flask import Flask, request, render_template_string
|
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
|
from flask_cors import CORS
|
|
|
+from prometheus_flask_exporter import PrometheusMetrics
|
|
|
from .constant import error_response
|
|
|
from .exception import BizException
|
|
|
|
|
@@ -16,6 +17,7 @@ logging.getLogger('apscheduler').setLevel(logging.CRITICAL)
|
|
|
|
|
|
def create_app():
|
|
|
_app = Flask(__name__)
|
|
|
+ _metrics = PrometheusMetrics(_app)
|
|
|
# 添加配置文件
|
|
|
_app.config.from_object(BaseConfig)
|
|
|
|