Skip to content

prometheus_write: log rejected HTTP responses - #1034

Open
osmocomet wants to merge 1 commit into
openconfig:mainfrom
osmocomet:prometheus-write-log-status-errors
Open

osmocomet wants to merge 1 commit into
openconfig:mainfrom
osmocomet:prometheus-write-log-status-errors

Conversation

@osmocomet

Copy link
Copy Markdown

With global logging enabled, prometheus_write counts HTTP responses of 300 or higher as failed writes but logs them only when output debug is on. A receiver returning 401 can therefore drop batches without an error in normal logs.

Log the status code at Error, as transport failures already are, without adding the response body to normal logs. Add a regression test for 401.

Fixes #1033.

@google-cla

google-cla Bot commented Sep 29, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prometheus_write: rejected writes are not logged without debug

1 participant