diff --git a/cookbook/litellm_proxy_server/grafana_dashboard/dashboard_all_metrics/grafana_dashboard.json b/cookbook/litellm_proxy_server/grafana_dashboard/dashboard_all_metrics/grafana_dashboard.json index cedbbd0f07b..9d0d246f82c 100644 --- a/cookbook/litellm_proxy_server/grafana_dashboard/dashboard_all_metrics/grafana_dashboard.json +++ b/cookbook/litellm_proxy_server/grafana_dashboard/dashboard_all_metrics/grafana_dashboard.json @@ -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": { diff --git a/tests/unit/integrations/test_prometheus_metric_name_consistency.py b/tests/unit/integrations/test_prometheus_metric_name_consistency.py index 2c1def4c613..75e578dfac5 100644 --- a/tests/unit/integrations/test_prometheus_metric_name_consistency.py +++ b/tests/unit/integrations/test_prometheus_metric_name_consistency.py @@ -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,