forked from phoenix/litellm-mirror
Merge pull request #2752 from BerriAI/litellm_grafana_metrics
[Fix + Docs] grafana / prometheus metrics
This commit is contained in:
commit
e40a86d37a
3 changed files with 12 additions and 6 deletions
|
@ -4,6 +4,8 @@ LiteLLM Exposes a `/metrics` endpoint for Prometheus to Poll
|
|||
|
||||
## Quick Start
|
||||
|
||||
If you're using the LiteLLM CLI with `litellm --config proxy_config.yaml` then you need to `pip install prometheus_client==0.20.0`. **This is already pre-installed on the litellm Docker image**
|
||||
|
||||
Add this to your proxy config.yaml
|
||||
```yaml
|
||||
model_list:
|
||||
|
@ -34,6 +36,12 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \
|
|||
}'
|
||||
```
|
||||
|
||||
View Metrics on `/metrics`, Visit `http://localhost:4000/metrics`
|
||||
```shell
|
||||
http://localhost:4000/metrics
|
||||
|
||||
# <proxy_base_url>/metrics
|
||||
```
|
||||
|
||||
## Metrics Tracked
|
||||
|
||||
|
|
|
@ -43,8 +43,5 @@ model_list:
|
|||
model: openai/fake
|
||||
api_key: fake-key
|
||||
api_base: https://exampleopenaiendpoint-production.up.railway.app/
|
||||
general_settings:
|
||||
master_key: sk-1234
|
||||
disable_spend_logs: true
|
||||
disable_reset_budget: true
|
||||
num_retries: 2
|
||||
litellm_settings:
|
||||
success_callback: ["prometheus"]
|
|
@ -6235,7 +6235,8 @@ def set_callbacks(callback_list, function_id=None):
|
|||
elif callback == "datadog":
|
||||
dataDogLogger = DataDogLogger()
|
||||
elif callback == "prometheus":
|
||||
prometheusLogger = PrometheusLogger()
|
||||
if prometheusLogger is None:
|
||||
prometheusLogger = PrometheusLogger()
|
||||
elif callback == "dynamodb":
|
||||
dynamoLogger = DyanmoDBLogger()
|
||||
elif callback == "s3":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue