Skip to content

Support users options to export go schedule related runtime metrics #2892

@Spground

Description

@Spground

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions