|
@@ -25,7 +25,7 @@ from entity import Error
|
|
|
import traceback
|
|
|
from util import insert_log, timetic
|
|
|
from prometheus_fastapi_instrumentator import Instrumentator
|
|
|
-from prometheus_client import Histogram
|
|
|
+
|
|
|
import time
|
|
|
|
|
|
|
|
@@ -36,8 +36,7 @@ app = FastAPI()
|
|
|
|
|
|
# 服务监控,qps,latent, cpu利用率
|
|
|
Instrumentator().instrument(app).expose(app)
|
|
|
-# from util.registry import AI_BOT_REQUEST_LATENCY
|
|
|
-AI_BOT_REQUEST_LATENCY = Histogram('ai_bot_request_latency', '文本机器人接口耗时',['bid'])
|
|
|
+from util.registry import AI_BOT_REQUEST_LATENCY
|
|
|
|
|
|
|
|
|
@app.post("/botservice")
|