Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fix: f…
Browse files Browse the repository at this point in the history
…allback to `gauge` for `protofmt`-based negotiations
  • Loading branch information
rexagod committed Mar 27, 2024
1 parent 8e7b38d commit 2a06c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/metricshandler/metrics_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ func (m *MetricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

contentType := expfmt.NegotiateIncludingOpenMetrics(r.Header)

// Assume text/plain if no Content-Type header is set.
if contentType == expfmt.FmtUnknown {
// We do not support protobuf at the moment. Fall back to FmtText if the negotiated exposition format is not FmtOpenMetrics See: https://github.com/kubernetes/kube-state-metrics/issues/2022.
if contentType != expfmt.FmtOpenMetrics_1_0_0 && contentType != expfmt.FmtOpenMetrics_0_0_1 {
contentType = expfmt.FmtText
}
resHeader.Set("Content-Type", string(contentType))
Expand Down

0 comments on commit 2a06c45

Please sign in to comment.