Skip to content

Commit

Permalink
Switch away from deprecated prometheus collectors (#6025)
Browse files Browse the repository at this point in the history
As of the update from 1.7.1 to 1.12.1 (#5974), the
`prometheus.NewFooCollector` methods have been deprecated
and replaced by equivalent `collectors.NewFooCollector` methods.
  • Loading branch information
aarongable committed Mar 31, 2022
1 parent f1e56cf commit 9b7f292
Show file tree
Hide file tree
Showing 9 changed files with 380 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

"github.com/go-sql-driver/mysql"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/letsencrypt/boulder/core"
Expand Down Expand Up @@ -182,9 +183,9 @@ func NewLogger(logConf SyslogConfig) blog.Logger {

func newStatsRegistry(addr string, logger blog.Logger) prometheus.Registerer {
registry := prometheus.NewRegistry()
registry.MustRegister(prometheus.NewGoCollector())
registry.MustRegister(prometheus.NewProcessCollector(
prometheus.ProcessCollectorOpts{}))
registry.MustRegister(collectors.NewGoCollector())
registry.MustRegister(collectors.NewProcessCollector(
collectors.ProcessCollectorOpts{}))

mux := http.NewServeMux()
// Register the available pprof handlers. These are all registered on
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.

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.

Loading

0 comments on commit 9b7f292

Please sign in to comment.