[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:
fl0w2o48
2025-11-27 15:05:09 +08:00
committed by GitHub
parent ce9a49f6bf
commit e63d715fc3
17 changed files with 878 additions and 280 deletions
+9
View File
@@ -33,6 +33,15 @@ if os.getenv("PROMETHEUS_MULTIPROC_DIR", "") == "":
import typing
# first import prometheus setup to set PROMETHEUS_MULTIPROC_DIR
# otherwise, the Prometheus package will be imported first,
# which will prevent correct multi-process setup
from fastdeploy.metrics.prometheus_multiprocess_setup import (
setup_multiprocess_prometheus,
)
setup_multiprocess_prometheus()
from paddleformers.utils.log import logger as pf_logger
from fastdeploy.engine.sampling_params import SamplingParams