-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
KEP-4346: client-go: Add informer metrics #4349
Conversation
chenk008
commented
Nov 29, 2023
- One-line PR description: Add informer metrics about reflector/queue/eventHandler.
- Issue link: client-go: Add metrics into informer #4346
- Other comments:
Welcome @chenk008! |
Hi @chenk008. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
5d2b9d1
to
1b36da4
Compare
1b36da4
to
e481b2f
Compare
/ok-to-test |
add test describe fill section: Feature Enablement and Rollback mitigate memory usage add memory usage metrics Signed-off-by: chenk008 <kongchen28@gmail.com>
32e4b1c
to
4ce3b45
Compare
|
||
- Introduce the informer metrics struct `informerMetrics` contains queue/eventHandler metrics | ||
- Introduce the informer metrics provider interface `informerMetricsProvider`, implement in `k8s.io/component-base/metrics` | ||
- Add an environment to enable informer metrics |
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 do we need an environment variable to enable them?
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 do we need an environment variable to enable them?
I think this got updated to a featuregate. This type of metric has been attempted at least once (maybe twice?) and reverted for problems each time. Being able to disable our first attempt could help avoid a rush to patch all the impacted clients.
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.
With the new client-go featuregates, we also have the option of enabling early in our control-plane side components via the composition mechanism.
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.
Replace it with featuregate, PTAL
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.
Replace it with featuregate, PTAL
forgot to push?
|
||
- `<package>`: `<date>` - `<test coverage>` | ||
|
||
##### Integration tests |
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.
IIRC there was some tests for metrics and granularity of them @logicalhan @dgrisonnet can you help us here?
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.
We do have some precedence of integration tests for metrics such as these ones for the apiserver: https://github.com/kubernetes/kubernetes/blob/87fa400d9ddf4fa48ab32a7d745a3b60dc785e5d/test/integration/metrics/metrics_test.go as well as some utilities to write some https://github.com/kubernetes/kubernetes/blob/87fa400d9ddf4fa48ab32a7d745a3b60dc785e5d/staging/src/k8s.io/component-base/metrics/testutil/testutil.go.
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.
Add some tests for metrics subsystem/label/granularity, PTAL
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.
Add some tests for metrics subsystem/label/granularity, PTAL
forgot to push?
I'm happy with this for apimachinery and PRR. The comments from others should be addressed. |
Co-authored-by: Han Kang <hankang@google.com>
Co-authored-by: Han Kang <hankang@google.com>
/tide merge-method-squash |
listDuration SummaryMetric | ||
numberOfItemsInList SummaryMetric |
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.
SummaryMetrics are non-aggregatable. It'd be better to use histograms instead.
/label tide-merge-method-squash |
@deads2k: The label(s) 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. |
/label tide/merge-method-squash |
It looks like the author agreed to all feedback, forgot to push, and won't make it back online before KEP freeze (timezone check in slack). The delta for the agreed (but forgot to push) changes is small. Rather than miss freeze, I'm going to approve this and accept the minor fix up tomorrow. Should some comment suddenly become contentious (I doubt it), we'll revert. approving for apimachinery and PRR. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chenk008, deads2k 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 |