mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[BugFix][Metrics] Fix Prometheus Multiprocess Metrics Issues and Add ZMQ Communication Metrics (#5185)
* [Feature] add metrics for ZMQ and fix multiprocess metrics * fix test_metrics.py --------- Co-authored-by: Jiaxin Sui <95567040+plusNew001@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@ import traceback
|
||||
import zmq
|
||||
|
||||
from fastdeploy.inter_communicator import ZmqTcpServer
|
||||
from fastdeploy.metrics.metrics import get_filtered_metrics, main_process_metrics
|
||||
from fastdeploy.metrics.metrics import get_filtered_metrics
|
||||
from fastdeploy.utils import envs, get_logger
|
||||
|
||||
logger = get_logger("internal_adapter_utils", "internal_adapter_utils.log")
|
||||
@@ -88,10 +88,7 @@ class InternalAdapter:
|
||||
self.recv_control_cmd_server.response_for_control_cmd(task_id_str, result)
|
||||
|
||||
elif task["cmd"] == "get_metrics":
|
||||
metrics_text = get_filtered_metrics(
|
||||
[],
|
||||
extra_register_func=lambda reg: main_process_metrics.register_all(reg, workers=1),
|
||||
)
|
||||
metrics_text = get_filtered_metrics()
|
||||
result = {"task_id": task_id_str, "result": metrics_text}
|
||||
logger.debug(f"Response for task: {task_id_str}")
|
||||
with self.response_lock:
|
||||
|
||||
Reference in New Issue
Block a user