Skip to content
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(controller): Publish Work-queue Prometheus metrics #17017

Closed
wants to merge 4 commits into from

Conversation

sonamkshenoy
Copy link
Member

@sonamkshenoy sonamkshenoy commented Jan 28, 2024

Fixes: #16315 , #12241
Re-addresses: #7682 (PR: #8318)

Screenshot 2024-01-28 at 6 19 29 PM

The reason the work-queue metrics weren't being exported despite the init function introduced by this PR, is that the init() function of the workqueue.go was being called before the argo's init(). These metrics were thus getting registered with the controller-runtimes metrics registry instead of the argo's one. And only the first init() registers the Prometheus registry with the work queues [refer doc].

This PR includes the controller-runtime's registry's metrics.

This however comes at the cost of other unwanted metrics.
These unwanted metrics have been excluded as far as possible. Yet, they are quite a few.

@sonamkshenoy sonamkshenoy requested a review from a team as a code owner January 28, 2024 14:10
@sonamkshenoy sonamkshenoy changed the title fix(controller): Export Work-queue Prometheus metrics fix(controller): Publish Work-queue Prometheus metrics Jan 28, 2024
Copy link

codecov bot commented Jan 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4e084ac) 49.23% compared to head (9abd37f) 49.26%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #17017      +/-   ##
==========================================
+ Coverage   49.23%   49.26%   +0.02%     
==========================================
  Files         274      273       -1     
  Lines       48113    48105       -8     
==========================================
+ Hits        23689    23699      +10     
+ Misses      22079    22062      -17     
+ Partials     2345     2344       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blakepettersson
Copy link
Member

Duplicate of #17013

@blakepettersson blakepettersson marked this as a duplicate of #17013 Jan 28, 2024
@sonamkshenoy
Copy link
Member Author

sonamkshenoy commented Jan 28, 2024

Ahh yes, the PR seems to have made similar changes.

However, I'm wondering if the /metrics endpoint isn't working in that PR or is it just for me?
Could close this one if that isn't the case :)

@sonamkshenoy
Copy link
Member Author

sonamkshenoy commented Feb 2, 2024

Seems to be worked on in this PR: #17013
Will close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Application Controller no longer publishes workqueue_depth metrics
2 participants