[Chore LiteLLM Proxy] enforce prometheus metrics as enterprise feature (#5769)

* enforce prometheus as enterprise feature

* show correct error on prometheus metric when not enrterprise user

* docs promethues metrics enforced

* fix enforcing
This commit is contained in:
Ishaan Jaff 2024-09-18 16:28:12 -07:00 committed by GitHub
parent 7e07c37be7
commit 50cc7c0353
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 14 deletions

View file

@ -4,7 +4,8 @@ import TabItem from '@theme/TabItem';
# 📈 [BETA] Prometheus metrics
:::info
🚨 Prometheus metrics will be out of Beta on September 15, 2024 - as part of this release it will be on LiteLLM Enterprise starting at $250/mo
✨ Prometheus metrics is on LiteLLM Enterprise starting at $250/mo
[Enterprise Pricing](https://www.litellm.ai/#pricing)

View file

@ -26,9 +26,17 @@ class PrometheusLogger(CustomLogger):
try:
from prometheus_client import Counter, Gauge, Histogram
verbose_logger.warning(
"🚨🚨🚨 Prometheus Metrics will be moving to LiteLLM Enterprise on September 15th, 2024.\n🚨 Contact us here to get a license https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat \n🚨 Enterprise Pricing: https://www.litellm.ai/#pricing"
)
from litellm.proxy.proxy_server import CommonProxyErrors, premium_user
if premium_user is not True:
verbose_logger.warning(
f"🚨🚨🚨 Prometheus Metrics is on LiteLLM Enterprise\n🚨 {CommonProxyErrors.not_premium_user.value}"
)
self.litellm_not_a_premium_user_metric = Counter(
name="litellm_not_a_premium_user_metric",
documentation=f"🚨🚨🚨 Prometheus Metrics is on LiteLLM Enterprise. 🚨 {CommonProxyErrors.not_premium_user.value}",
)
return
self.litellm_llm_api_failed_requests_metric = Counter(
name="litellm_llm_api_failed_requests_metric",

View file

@ -6,16 +6,6 @@ model_list:
api_base: https://exampleopenaiendpoint-production.up.railway.app
assistant_settings:
custom_llm_provider: azure
litellm_params:
api_key: os.environ/AZURE_API_KEY
api_base: os.environ/AZURE_API_BASE
general_settings:
master_key: sk-1234
litellm_settings: