mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
fix(prometheus_services.py): add better import error statement
This commit is contained in:
parent
71580c1245
commit
67d0d5e356
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue