We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7f1ca95 + 22140b0 commit 00affc0Copy full SHA for 00affc0
1 file changed
litellm/proxy/middleware/in_flight_requests_middleware.py
@@ -62,13 +62,14 @@ def _get_gauge() -> Optional[Any]:
62
try:
63
from prometheus_client import Gauge
64
65
+ kwargs: dict[str, Any] = {}
66
if "PROMETHEUS_MULTIPROC_DIR" in os.environ:
67
# livesum aggregates across all worker processes in the scrape response
68
kwargs["multiprocess_mode"] = "livesum"
69
InFlightRequestsMiddleware._gauge = Gauge(
70
"litellm_in_flight_requests",
71
"Number of HTTP requests currently in-flight on this uvicorn worker",
- **kwargs, # type: ignore[arg-type]
72
+ **kwargs,
73
)
74
except Exception:
75
InFlightRequestsMiddleware._gauge = None
0 commit comments