Add Prometheus metrics to readiness condition reporter - #379
Conversation
✅ Deploy Preview for node-readiness-controller ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @rawadhossain. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
/ok-to-test |
AvineshTripathi
left a comment
There was a problem hiding this comment.
Thank you for starting this PR! I have left some comments
| // reporterChecksTotal tracks total probe check results over time. | ||
| reporterChecksTotal = prometheus.NewCounterVec( | ||
| prometheus.CounterOpts{ | ||
| Name: "node_readiness_reporter_checks_total", |
There was a problem hiding this comment.
node_readiness_reporter_checks instead
There was a problem hiding this comment.
but I see in #344 it says node_readiness_reporter_checks_total
There was a problem hiding this comment.
Yeah, was confused about this too, so kept it as in the design doc.
There was a problem hiding this comment.
I followed https://prometheus.io/docs/practices/naming/#metric-names. The metrics convention suggests that an accumulating count has total as a suffix. Also on a similar note, https://www.robustperception.io/on-the-naming-of-things/ was a good read on why our node_readiness_rules_total (a gauge) metric could drop the suffix as can cause to confusions like this.
Signed-off-by: Rawad Hossain <rawad.hossain00@gmail.com>
Signed-off-by: Rawad Hossain <rawad.hossain00@gmail.com>
3613030 to
2e35f85
Compare
|
/lgtm I think this is all good now. @ajaysundark can you take a final look |
|
/lgtm please address the comments when you get time before we could merge this. |
|
/lgtm Adding it again! Changes looks good |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ajaysundark, rawadhossain The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Implements the Reporter metrics specified in the observability design
node_readiness_reporter_build_infonode_readiness_reporter_check_duration_secondsnode_readiness_reporter_checks_totalnode_readiness_reporter_condition_writes_totalAlso adds the Prometheus
/metricsand/healthzendpoints to the readiness condition reporter.Implementation choices
/metricsand/healthzto keep the Reporter to one listener and port.:9445as the default metrics port because the Reporter runs withhostNetwork: true. The address is configurable throughMETRICS_BIND_ADDRESS.Build fix
Updated
Dockerfile.reporterto build the Reporter package instead of single filemain.go, since the newmetrics.goalso needs to be included.Fixes #380
Type of Change
/kind feature
Testing
kindcluster and Prometheus.Checklist
make testpassesmake lintpasses