docs Stop storing Spend Logs in DB

This commit is contained in:
Ishaan Jaff 2025-03-15 11:09:24 -07:00
parent a3a03d411b
commit b6f3d124d9
4 changed files with 55 additions and 2 deletions

View file

@ -0,0 +1,52 @@
import Image from '@theme/IdealImage';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# UI Logs Page
View Spend, Token Usage, Key, Team Name for Each Request to LiteLLM
<Image img={require('../../img/ui_request_logs.png')}/>
## Overview
| Log Type | Tracked by Default |
|----------|-------------------|
| Success Logs | ✅ Yes |
| Error Logs | ✅ Yes |
| Request/Response Content Stored | ❌ No by Default, **opt in with `store_prompts_in_spend_logs`** |
**By default LiteLLM does not track the request and response content.**
## Tracking - Request / Response Content in Logs Page
If you want to switch on request and response content tracking, you need to opt in with this setting
```yaml
general_settings:
store_prompts_in_spend_logs: true
```
## Stop storing Error Logs in DB
If you do not want to store error logs in DB, you can opt out with this setting
```yaml
general_settings:
disable_error_logs: True # Only disable writing error logs to DB, regular spend logs will still be written unless `disable_spend_logs: True`
```
## Stop storing Spend Logs in DB
If you do not want to store spend logs in DB, you can opt out with this setting
```yaml
general_settings:
disable_spend_logs: True # Disable writing spend logs to DB
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 KiB

View file

@ -60,7 +60,7 @@ Here's a Demo Instance to test changes:
4. **Bug Fixes**
- Return `code`, `param` and `type` on OpenAI bad request error [LiteLLM Exception Mapping](https://docs.litellm.ai/docs/exception_mapping)
- Return `code`, `param` and `type` on OpenAI bad request error [More information on litellm exceptions](https://docs.litellm.ai/docs/exception_mapping)
- Fix Bedrock converse chunk parsing to only return empty dict on tool use [PR](https://github.com/BerriAI/litellm/pull/9166)
- Fix Azure Function Calling Bug & Update Default API Version to `2025-02-01-preview` [PR](https://github.com/BerriAI/litellm/pull/9191)
- Fix Perplexity incorrect streaming response [PR](https://github.com/BerriAI/litellm/pull/9081)

View file

@ -101,7 +101,8 @@ const sidebars = {
"proxy/admin_ui_sso",
"proxy/self_serve",
"proxy/public_teams",
"proxy/custom_sso"
"proxy/custom_sso",
"proxy/ui_logs"
],
},
{