Skip to content

fix(monitoring): Drop the caller labels from the gateway series - #5896

Merged
dan-petty merged 1 commit into
mainfrom
fix/4545-drop-the-caller-labels
Nov 15, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/4545-drop-the-caller-labels

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The gateway ServiceMonitor now drops client_ip and user_agent at scrape time, because each short caller pod adds a new client_ip value and no panel, alert or test reads either label. Three k8s row checks hold the endpoint rules and refuse a dashboard or alert expression that names the labels again.

Closes #4545

Change: openspec/changes/archive/2026-11-15-4545-drop-the-caller-labels/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/monitoring Grafana, Prometheus, Loki, alerts and dashboards labels Nov 15, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 15, 2026 21:44
@dan-petty
dan-petty merged commit d0929e1 into main Nov 15, 2026
24 checks passed
@dan-petty
dan-petty deleted the fix/4545-drop-the-caller-labels branch November 15, 2026 22:58
dan-petty pushed a commit that referenced this pull request Nov 15, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.159.0](v0.158.0...v0.159.0)
(2026-11-15)


### Features

* **ai:** Record the cost of Jev calls
([#5879](#5879))
([d1ac8ca](d1ac8ca))
* **ci:** add OpenTofu 1.13.9 to images and CI
([#5862](#5862))
([ca62d6a](ca62d6a))
* **roadmap:** Require the contract test of a workflow change
([#5877](#5877))
([f81f4b9](f81f4b9))


### Bug Fixes

* **ai:** do not classify gateway endpoint as local backend
([#5874](#5874))
([8c09c33](8c09c33))
* **k8s:** Name the collector service that exists
([#5895](#5895))
([a20c801](a20c801))
* **monitoring:** Drop the caller labels from the gateway series
([#5896](#5896))
([d0929e1](d0929e1))
* **roadmap:** check the premise before the first step
([#5886](#5886))
([1b12e5c](1b12e5c))
* **roadmap:** handle git grep timeout in refine context collection
([#5872](#5872))
([0eecb65](0eecb65))
* **roadmap:** Judge no criterion in the paths gate
([#5875](#5875))
([ca88553](ca88553))
* **roadmap:** plan drift keeps other needs-fix labels
([#5888](#5888))
([93e57ed](93e57ed))
* **roadmap:** refine designs against an alert without its rule text
([#5882](#5882))
([cbd8bf7](cbd8bf7))
* **roadmap:** the refine proposal caps its context with a job constant
([#5878](#5878))
([25fca43](25fca43))


### Performance Improvements

* **roadmap:** File a new candidate with one request
([#5894](#5894))
([5fea092](5fea092))


### Code Refactoring

* **github:** one pull request verdict for all monitors
([#5889](#5889))
([d93b753](d93b753)),
closes [#5021](#5021)
* **roadmap:** one open step for every pull request
([#5870](#5870))
([6e9f577](6e9f577)),
closes [#5020](#5020)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
dan-petty added a commit that referenced this pull request Nov 19, 2026
The gateway now excludes `client_ip` and `user_agent` at the source with
LiteLLM's own `litellm_settings.prometheus_exclude_labels`, set before
`callbacks`. LiteLLM v1.103.11 reads the key
(`litellm/integrations/prometheus.py:275`, `:1188-1204`) and adds the
counts of all callers into one series before exposition. The two
`labeldrop` rules leave the gateway ServiceMonitor, and the gate check
that asserted them leaves the k8s row.

The `labeldrop` rules of #5896 made two series that differ only in these
labels identical. Prometheus refused the remote write of Alloy with
"duplicate sample for timestamp", and Alloy dropped full batches: 8.1 %
of all samples on 2026-11-19, with gaps in targets that have no fault.
Exclusion at the source stops the collisions and keeps the bound on the
series count of #4545.

Closes #6439

Change:
`openspec/changes/archive/2026-11-19-6439-exclude-gateway-caller-labels/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/monitoring Grafana, Prometheus, Loki, alerts and dashboards type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(monitoring): drop per-pod labels from gateway spend series

1 participant