Skip to content

Commit

Permalink
Update prometheus/client_golang to 1.0.0 (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
capella committed Jul 15, 2019
1 parent d059578 commit a2fab1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
18 changes: 9 additions & 9 deletions Gopkg.lock

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

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ required = ["github.com/gogo/protobuf/gogoproto"]

[[constraint]]
name = "github.com/prometheus/client_golang"
version = "0.8.0"
version = "1.0.0"

[[constraint]]
branch = "master"
Expand Down
3 changes: 2 additions & 1 deletion metrics/prometheus_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"sync"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/topfreegames/pitaya/config"
"github.com/topfreegames/pitaya/constants"
)
Expand Down Expand Up @@ -298,7 +299,7 @@ func GetPrometheusReporter(
gaugeReportersMap: make(map[string]*prometheus.GaugeVec),
}
prometheusReporter.registerMetrics(constLabels, additionalLabels, spec)
http.Handle("/metrics", prometheus.Handler())
http.Handle("/metrics", promhttp.Handler())
go (func() {
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
})()
Expand Down

0 comments on commit a2fab1a

Please sign in to comment.