Repository navigation
build(deps): Bump github.com/prometheus/client_golang from 1.24.1 to 1.25.0 - #3031
dependabot[bot] wants to merge 1 commit into
Conversation
855120a to
c293009
Compare
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.24.1 to 1.25.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.25.0/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.24.1...v1.25.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-version: 1.25.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
c293009 to
5e07121
Compare
| for k, v := range target.Params { | ||
| if k == "charset" { | ||
| continue | ||
| } | ||
| if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { | ||
| return FmtText + escapingScheme | ||
| acVal := ac.Params[k] | ||
| if k == "version" { | ||
| acVal = acVersion | ||
| } | ||
| if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion_0_0_1 || ver == OpenMetricsVersion_1_0_0 || ver == "") { | ||
| switch ver { | ||
| case OpenMetricsVersion_1_0_0: | ||
| return FmtOpenMetrics_1_0_0 + escapingScheme | ||
| default: | ||
| return FmtOpenMetrics_0_0_1 + escapingScheme | ||
| } | ||
| if acVal != v { | ||
| return false | ||
| } |
There was a problem hiding this comment.
🟡 Wildcard metrics requests ignore format preference
For Accept: */*, matchFormat rejects every default format because the wildcard lacks version and protobuf parameters. NegotiateAccept falls back to text instead of the server's preferred format.
Learn more
The metrics handler uses NegotiateAccept to choose a response format from an ordered list. A wildcard Accept clause represents all media types, but matchFormat still compares its absent parameters with each format's required version or protobuf parameters. None of the default formats match, so the fallback chooses text even when the client allows protobuf and the server lists it first. The same failure affects application/* when only parameterized protobuf formats are accepted.
Example: With default formats and Accept: */*, negotiation returns text/plain rather than the preferred delimited protobuf format.
Recommended fix: In matchFormat, treat wildcard clauses without format parameters as matching compatible media types before checking format-specific parameters. Preserve explicit version and protobuf parameter validation for non-wildcard requests, and test */* and subtype wildcards against the ordered accepted formats.
Was this helpful? React with 👍 or 👎 to provide feedback.
Bumps github.com/prometheus/client_golang from 1.24.1 to 1.25.0.
Release notes
Sourced from github.com/prometheus/client_golang's releases.
... (truncated)
Changelog
Sourced from github.com/prometheus/client_golang's changelog.
Commits
0d88875Cut v1.25.0 (#2164)e9946eeCut v1.25.0-rc.0 (#2154)de866d6Merge pull request #2152 from prometheus/dependabot/go_modules/api/prometheus...a37302fprometheus: fix modernize lint findings (#2151)a3fa380build(deps): bump google.golang.org/grpc9da3fccfix: updates for tsdb blocks handling (#1928)0ecb5c2api: match complete URL placeholders (#2136)2ad001aexp/api/remote: reset buffer before generic marshal (#2139)0db8d43promhttp: vary negotiated metrics responses (#2142)b1f9c7aMerge pull request #2144 from prometheus/dependabot/go_modules/exp/github.com...