mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-11 00:25:15 +00:00
fix(prometheus_services.py): add better import error statement
This commit is contained in:
@@ -24,7 +24,12 @@ class PrometheusServicesLogger:
|
||||
**kwargs,
|
||||
):
|
||||
try:
|
||||
from prometheus_client import Counter, Histogram, REGISTRY
|
||||
try:
|
||||
from prometheus_client import Counter, Histogram, REGISTRY
|
||||
except ImportError:
|
||||
raise Exception(
|
||||
"Missing prometheus_client. Run `pip install prometheus-client`"
|
||||
)
|
||||
|
||||
self.Histogram = Histogram
|
||||
self.Counter = Counter
|
||||
|
||||
Reference in New Issue
Block a user