Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
update README with non-deprecated promhttp Handler (#21)
Browse files Browse the repository at this point in the history
The `http.Handler()` is deprecated per [golang client http.go comment](https://github.com/prometheus/client_golang/blob/master/prometheus/http.go#L63-L66):
```
// Deprecated: Please note the issues described in the doc comment of
// InstrumentHandler. You might want to consider using promhttp.Handler instead
// (which is not instrumented, but can be instrumented with the tooling provided
// in package promhttp).
```
Update README to recommend non-deprecated [Handler from promhttp](https://github.com/prometheus/client_golang/blob/master/prometheus/promhttp/http.go#L77).
  • Loading branch information
drausin authored and Michal Witkowski committed Aug 26, 2017
1 parent dbe6048 commit 0dafe0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import "github.com/grpc-ecosystem/go-grpc-prometheus"
// After all your registrations, make sure all of the Prometheus metrics are initialized.
grpc_prometheus.Register(myServer)
// Register Prometheus metrics handler.
http.Handle("/metrics", prometheus.Handler())
http.Handle("/metrics", promhttp.Handler())
...
```

Expand Down

0 comments on commit 0dafe0d

Please sign in to comment.