controller-runtime
controller-runtime copied to clipboard
Support users options to export go schedule related runtime metrics
controller-runtime register NewGoCollector() to export go runtime metrics, as https://github.com/kubernetes-sigs/controller-runtime/blob/67854429a3437a7684136c46fd8af1d33ea90de4/pkg/internal/controller/metrics/metrics.go#L84C14-L84C28.
However, prometheus/cient_golang incompatible upgrade leads original behavior breaks. Empty options args infunc NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) will disable go_sche* metrics after v0.14.0, go_sche* is default enable before v.14.0.
https://github.com/prometheus/client_golang/blob/6e3f4b1091875216850a486b1c2eb0e5ea852f98/prometheus/go_collector_latest.go#L165
We should provide options to user to configure what they want.
/kind feature