Skip to content

Commit

Permalink
Merge pull request #111910 from tosi3k/go-runtime-metrics
Browse files Browse the repository at this point in the history
Enable new set of Go metrics in Kubernetes
  • Loading branch information
k8s-ci-robot committed Aug 29, 2022
2 parents 67d75db + ce65b71 commit bf2e850
Show file tree
Hide file tree
Showing 8 changed files with 485 additions and 4 deletions.
Expand Up @@ -20,6 +20,7 @@ import (
"net/http"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus/promhttp"

"k8s.io/component-base/metrics"
Expand All @@ -44,10 +45,8 @@ var (
)

func init() {
//nolint:staticcheck // SA1019 - replacement function still calls prometheus.NewProcessCollector().
RawMustRegister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))
//nolint:staticcheck // SA1019 - replacement function still calls prometheus.NewGoCollector().
RawMustRegister(prometheus.NewGoCollector())
RawMustRegister(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}))
RawMustRegister(collectors.NewGoCollector(collectors.WithGoCollectorRuntimeMetrics(collectors.MetricsAll)))
}

// Handler returns an HTTP handler for the DefaultGatherer. It is
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf2e850

Please sign in to comment.