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
✨ Add a separate registry for workqueue metrics #2671
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sonamkshenoy 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 |
Welcome @sonamkshenoy! |
Hi @sonamkshenoy. 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 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. |
/hold This does allow the existing behavior while introducing the set of metrics you propose to a different registry. However, this does not allow this to be configurable in the init and set this to what you provided. In the issue we discussed allowing this to take the defined metrics to be initialized to a new registry to not utilize the internal registry. If what you need are the metrics defined by this package, to have it be provided to the new registry, is there a way we can do this on the consumer side where you can push them to where ever you want? It sounded like the problem was you didn't want all the rest of the stuff and the things you did need, you wanted them in a different registry. |
Hey @troy0820 Yep, I need just the work queue related metrics in my application. So, in this case (which implements the approach 1), I could have these metrics directly as
I'm not sure there is a way I can do this? The init() function in this package gets called before the init() function in our application as it is being imported (and probably called first). Thus, even if we create our metrics, we can't register them with the work queue, unless we remove the |
WorkqueueRegistry.MustRegister(longestRunningProcessor) | ||
WorkqueueRegistry.MustRegister(retries) | ||
|
||
Registry.Register(WorkqueueRegistry) |
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.
I understand the problem, but this means that the workqueue metrics will disappear for all existing users. That is not an option. We need to find a solution that does not break existing users.
/hold
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.
Hey @alvaroaleman , these metrics won't disappear actually. We are adding those metrics back to the main Registry
with Registry.Register(WorkqueueRegistry)
. So this won't affect anything for existing users.
There are 2 more options I could think of:
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This PR addresses #2670
A separate registry has been created for work queue metrics, so that we can import just this registry directly as
metrics.WorkqueueRegistry
without getting loads of other unrelated metrics.This retains the previous behaviour as all the metrics are still available in the main
Registry
.