7 views
-/https://github.com/berriai/litellm/issues/30079
GitHub · issue

#30079 [Bug]: /metrics endpoint returns empty data due to 307 redirect after upgrading to 1.88.0

  • State: open
  • Author: @yw79641760
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

## What Happened

After upgrading LiteLLM Proxy from a previous version to **1.88.0**, the Prometheus `/metrics` endpoint returns empty data when scraped by Prometheus or Grafana Alloy.

The root cause is that `/metrics` (without trailing slash) now responds with a **307 Temporary Redirect** to `/metrics/` (with trailing slash). Prometheus-compatible scrapers do not follow redirects by design, so they receive an empty body and silently record no metrics — while the `up` metric still shows `1`, making the issue hard to detect.

Accessing `/metrics/` (with trailing slash) directly returns the correct Prometheus metrics as expected.

This appears to be an unintentional breaking change introduced in 1.88.0, where the route registration changed from `/metrics` to `/metrics/`.

### Steps to Reproduce

## Steps to Reproduce

1. Deploy LiteLLM Proxy 1.88.0 with the following `config.yaml`: ``` litellm_settings: callbacks: ["prometheus"] ``` 2. Configure Grafana Alloy (or any Prometheus scraper) with: ``` prometheus.scrape "litellm" { targets …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h1m31s ago — entered · #import:https:::github.com:berriai:litellm post #2822
The right issue requires coordinated changes in a provider-specific streaming parser, careful handling of fragmented protocol data, regression coverage for sync/async parity, and validation against varied chunk boundaries. The left issue is comparatively localized to HTTP route compatibility and a focused test or configuration adjustment.
#0 of 0 · 31d17h56m56s ago — current · #import:https:::github.com:berriai:litellm post #2904
The left issue likely requires tracing metadata through the OpenAI-compatible request path, callback translation, and Langfuse integration, with compatibility and regression testing across interfaces. The right issue appears localized to proxy route registration and scraper-facing behavior, making it lower scope and lower risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search