diff --git a/README.md b/README.md index ed4af80..e41627f 100644 --- a/README.md +++ b/README.md @@ -197,11 +197,14 @@ import ( "github.com/segmentio/stats/v5/prometheus" ) -handler := prometheus.NewHandler() -stats.Register(handler) -http.Handle("/metrics", handler) +stats.Register(prometheus.DefaultHandler) +http.Handle("/metrics", prometheus.DefaultHandler) ``` +`Handler` has no `NewHandler` constructor; `DefaultHandler` is a ready-to-use zero-config +instance. Construct your own `&prometheus.Handler{}` literal instead if you need to set +`TrimPrefix`, `MetricTimeout`, or `Buckets`. + ### InfluxDB The [github.com/segmentio/stats/v5/influxdb](https://godoc.org/github.com/segmentio/stats/v5/influxdb) package sends metrics to InfluxDB using the line protocol over HTTP.