This commit is contained in:
innovation-ways 2026-10-28 08:45:27 +00:00 • committed by GitHub
commit 43ec513ace
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 59 additions and 0 deletions

View file

@ -5655,6 +5655,63 @@
"title": "litellm_spend_log_cleanup_batch_failures rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Disk used by the spend log tables, as last measured by the cleanup job. allocated is the total on disk, estimated_live is the share held by live rows, above_target is how far estimated_live exceeds the cleanup target (0 once reached)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1,
"showPoints": "never",
"spanNulls": false
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 405
},
"id": 117,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "max by (measure) (litellm_spend_log_storage_bytes)",
"legendFormat": "{{measure}}",
"range": true,
"refId": "A"
}
],
"title": "litellm_spend_log_storage_bytes",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {

View file

@ -60,6 +60,7 @@ def _lazy_owner_collectors() -> tuple[Collector, ...]:
assert SpendLogCleanupMetrics.rows_remaining is not None
assert SpendLogCleanupMetrics.batch_failures is not None
assert SpendLogCleanupMetrics.runs is not None
assert SpendLogCleanupMetrics.storage_bytes is not None
in_flight: Final = InFlightRequestsMiddleware._get_gauge()
assert in_flight is not None
services: Final = PrometheusServicesLogger()
@ -72,6 +73,7 @@ def _lazy_owner_collectors() -> tuple[Collector, ...]:
SpendLogCleanupMetrics.rows_remaining,
SpendLogCleanupMetrics.batch_failures,
SpendLogCleanupMetrics.runs,
SpendLogCleanupMetrics.storage_bytes,
in_flight,
services.redis_breaker_state,
services.redis_breaker_transitions,