mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Remove use of deprecated prometheus.Handler
Signed-off-by: beorn7 <beorn@soundcloud.com>
This commit is contained in:
parent
5e4a76e66b
commit
4fb59d1e61
|
@ -30,6 +30,7 @@ import (
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
"github.com/golang/snappy"
|
"github.com/golang/snappy"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
"github.com/prometheus/common/model"
|
"github.com/prometheus/common/model"
|
||||||
|
|
||||||
influx "github.com/influxdata/influxdb/client/v2"
|
influx "github.com/influxdata/influxdb/client/v2"
|
||||||
|
@ -97,7 +98,7 @@ func init() {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cfg := parseFlags()
|
cfg := parseFlags()
|
||||||
http.Handle(cfg.telemetryPath, prometheus.Handler())
|
http.Handle(cfg.telemetryPath, promhttp.Handler())
|
||||||
|
|
||||||
logLevel := promlog.AllowedLevel{}
|
logLevel := promlog.AllowedLevel{}
|
||||||
if err := logLevel.Set(cfg.logLevel); err != nil {
|
if err := logLevel.Set(cfg.logLevel); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue