Skip to content

Commit

Permalink
Merge "[FAB-13644] move to promhttp handler" into release-1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sykesm authored and Gerrit Code Review committed Jan 14, 2019
2 parents bbd4273 + c6ea50e commit ba5d8dc
Show file tree
Hide file tree
Showing 10 changed files with 1,432 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Gopkg.lock

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

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,7 @@ noverify = [
[[prune.project]]
name = "github.com/coreos/etcd"
non-go = false

[[constraint]]
name = "github.com/prometheus/client_golang"
version = "0.9.0"
4 changes: 2 additions & 2 deletions core/operations/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/hyperledger/fabric/common/metrics/statsd/goruntime"
"github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric/core/middleware"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)

//go:generate counterfeiter -o fakes/logger.go -fake-name Logger . Logger
Expand Down Expand Up @@ -178,7 +178,7 @@ func (s *System) initializeMetricsProvider() error {
case "prometheus":
s.Provider = &prometheus.Provider{}
s.versionGauge = versionGauge(s.Provider)
s.mux.Handle("/metrics", s.handlerChain(prom.Handler(), s.options.TLS.Enabled))
s.mux.Handle("/metrics", s.handlerChain(promhttp.Handler(), s.options.TLS.Enabled))
return nil

default:
Expand Down

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

0 comments on commit ba5d8dc

Please sign in to comment.