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

Dash in controller name cause metrics to be dropped #4716

Closed
JRBANCEL opened this issue Jul 11, 2019 · 3 comments · Fixed by #4735
Closed

Dash in controller name cause metrics to be dropped #4716

JRBANCEL opened this issue Jul 11, 2019 · 3 comments · Fixed by #4735
Assignees
Labels
area/monitoring area/networking kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@JRBANCEL
Copy link
Contributor

In what area(s)?

/area monitoring
/area networking
/kind bug

What version of Knative?

HEAD

Expected Behavior

Controller metrics are emitted.

Actual Behavior

Failed to export to Prometheus: cannot register the collector: descriptor Desc{fqName: "controller-ingress-istio_work_queue_depth", help: "Depth of the work queue", constLabels: {}, variableLabels: [reconciler]} is invalid: "controller-ingress-istio_work_queue_depth" is not a valid metric name

Metrics names are generated by concatenating the component name and the metric name.
In this case:

sharedmain.Main("controller-ingress-istio", clusteringress.NewController)

the prefix contains a -, which is not allowed in a metric name: see validation.

Solution

Rename the component to not contain a -.
Also applies to controller-certificate-cert-manager.

@JRBANCEL JRBANCEL added the kind/bug Categorizes issue or PR as related to a bug. label Jul 11, 2019
@JRBANCEL
Copy link
Contributor Author

/assign

@JRBANCEL
Copy link
Contributor Author

According to Prometheus, the namespace must be a single word: https://prometheus.io/docs/practices/naming/#metric-names

...should have a (single-word) application prefix relevant to the domain the metric belongs to. The prefix is sometimes referred to as namespace by client libraries. For metrics specific to an application, the prefix is usually the application name itself.

@vagababov
Copy link
Contributor

Should vs Must :-) but sure.

@mattmoor mattmoor added this to the Serving 0.8 milestone Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/monitoring area/networking kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants