Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
upgrade prometheus client_golang to v1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
qibobo committed Dec 17, 2019
1 parent bc8e77c commit 994eab5
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 879 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,6 @@
[submodule "src/github.com/juju/ratelimit"]
path = src/github.com/juju/ratelimit
url = https://github.com/juju/ratelimit
[submodule "src/github.com/cespare/xxhash"]
path = src/github.com/cespare/xxhash
url = https://github.com/cespare/xxhash.git
7 changes: 6 additions & 1 deletion src/autoscaler/healthendpoint/registrar.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import (
func RegisterCollectors(registrar prometheus.Registerer, collectors []prometheus.Collector, includeDefault bool, logger lager.Logger) {

if includeDefault {
err := registrar.Register(prometheus.NewProcessCollector(os.Getpid(), ""))
err := registrar.Register(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{
PidFn: func() (int, error) {
return os.Getpid(), nil
},
Namespace: "",
}))
if err != nil {
logger.Error("Failed to register process collector", err)
}
Expand Down
Loading

0 comments on commit 994eab5

Please sign in to comment.