-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fallback to gauge
for protofmt
-based negotiations
#2270
Conversation
Need to test this. |
Verified using the following configurations. Error logs were reported without this patch, but none when this was applied. DetailsPrometheus error log
KSM CRS Configuration
Prometheus Configuration
Generated CRS Metric (from Prometheus UI)
|
gauge
for protofmt
-based negotiationsgauge
for protofmt
-based negotiations
/triage accepted |
@dgrisonnet Yes, I believe we talked about dropping metric-standard lock-ins, and implementing a one-fits-all mechanism (probably on top of gauges) that allows us to generate an exposition format that is ingestible by most metric backends, if not all. |
(friendly ping @mrueg @dgrisonnet to /lgtm) |
2.11.0 introduced a regression, as metrics include |
… to `gauge` for `protofmt`-based negotiations
…allback to `gauge` for `protofmt`-based negotiations
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgrisonnet, mrueg, rexagod The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
Hey @rexagod ! is this also meant to fix #1973 replicating in 2.110?? |
It should, yes. |
@dgrisonnet Looks like this fix got merged in too late for v2.11.0. How do we feel about cutting a new release soon™ to get people unblocked? (Thanks in advance.) |
@rexagod bump ^ |
I'll put #2335 up for review today. |
Sharing here for visibility: #2335 (comment). |
hi @rexagod, i'm probably missing something but should not it also fallback to gauge on with
but handler falls-back to kube-state-metrics/pkg/metricshandler/metrics_handler.go Lines 200 to 206 in d3f0c18
thus exporter responds with type |
What this PR does / why we need it: Fallback to
gauge
metric type when the negotiated content-type isprotofmt
-based, since Prometheus' protobuf machinery does not recognize all OpenMetrics types (info
andstatesets
in this context).How does this change affect the cardinality of KSM: None.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2248