rcrowley / go-metrics

Go port of Coda Hale's Metrics library
Other
3.43k stars 493 forks source link

Prometheus integration #214

Closed tianxiaoliang closed 6 years ago

tianxiaoliang commented 6 years ago

Is there is way I can get metrics data from go-metrics. So I can expose a Rest API /metrics, to let prometheus collect. I don't want to use https://github.com/deathowl/go-metrics-prometheus

mihasya commented 6 years ago

There are lots of ways! See https://github.com/rcrowley/go-metrics/blob/master/exp/exp.go for an example.