-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Queue metrics broken when using the controller builder #436
Comments
I ran into this issue too. For added clarity, the immediate problem is the dash. This is the regex for valid metric names: |
The controller name is used in tracing, logging, eventing and monitoring. According to what @abursavich mentioned, using controller name as metric names(monitoring) should match prometheus metric name regex, but in other cases, no such restriction. Just as what KCM does, the queue metrics could just api kind as name, and the |
Having read more of the code, it looks like all of the workqueue metrics were "deprecated" and replaced with new metrics, however only a few of them have material changes:
AFAICT, the other metrics didn't change even though they were "deprecated". The reason for deprecating metrics and not immediately replacing them is generally to provide continuity for dashboards, alerting, etc. The changed metrics provided in controller-runtime don't provide this since the "deprecated" metrics are given new names (which are invalid). My proposal:
I can put together a PR for this. |
Well... It looks like the initial workqueue metrics in controller-runtime used kubernetes/client-go v1.13, but was half implemented in terms of v1.14:
|
I fixed the name bits in #458 so that we don't have dashes in the name. As for the other stuff, yeah, a PR would be awesome (will take a look at the linked PR -- going through a large notification backlog post kubecon) |
When starting a controller the following messages get logged:
Used controller-runtime version:
Code:
The problematic code: https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/builder/build.go#L234
This leads to invalid metric names like
node-application_depth
.Potential solutions IMHO:
-application
suffixNamed(name string)
function to the builder so controllers can have more meaningful namesWDYT?
The text was updated successfully, but these errors were encountered: