-
Notifications
You must be signed in to change notification settings - Fork 127
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
Bug 2092880: add static pod revision metrics #852
Conversation
@tjungblu: This pull request references Bugzilla bug 2092880, which is valid. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/label cherry-pick-approved
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: geliu2016, tjungblu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
revGauge := prometheus.NewGaugeVec(prometheus.GaugeOpts{ | ||
Namespace: "etcd_operator", | ||
Name: "static_pod_current_revision", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking one of your presubmits here in PromeCIeus:
sort_desc(count by (__name__) ({__name__=~".*revision.*"}))
finds:
etcd_debugging_auth_revision{}
etcd_debugging_mvcc_compact_revision{}
etcd_debugging_mvcc_current_revision{}
kube_statefulset_status_current_revision{}
kube_statefulset_status_update_revision{}
So... I don't see your new metric. And maybe it should be called static_pod_status_current_revision
? Squatting on a generic metric name with etcd-specific code feels brittle... etcd_static_pod_status_current_revision
? Or get the Gauge definition landed in library-go, where all interested static-pod consumers can share it?
@@ -137,6 +151,10 @@ func (c *EnvVarController) checkEnvVars() error { | |||
return err | |||
} | |||
|
|||
for _, status := range operatorStatus.NodeStatuses { | |||
c.revisionGauge.WithLabelValues(status.NodeName).Set(float64(status.CurrentRevision)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to work. I think you're missing the piping-it-into-channel, like this. Although I'm a bit fuzzy on how the existing etcd-operator metrics are wired up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need to pipe it into a channel, I thought registering it is enough to be scrapped, or ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, where are you setting up your metrics listener? Grepping around in the operator code, I'm not finding it...
/retest |
@tjungblu: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/hold |
@tjungblu: This pull request references Bugzilla bug 2092880. The bug has been updated to no longer refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
No description provided.