metafora icon indicating copy to clipboard operation
metafora copied to clipboard

Use go-metrics extensively

Open schmichael opened this issue 11 years ago • 3 comments

Instrument everything

Alternatively we could use go's builtin lightweight expvar and httpprof.

schmichael avatar Oct 06 '14 17:10 schmichael

Im all for limiting dependencies. Can we use expvar without automatically exposing it via HTTP? IMO, surfacing the metrics should be left to the hosting project.

epsniff avatar Oct 06 '14 17:10 epsniff

@epsniff

Can we use expvar without automatically exposing it via HTTP?

You don't have to start the HTTP server, but it does register its endpoints on the default HTTP server mux. You can't change that without forking it like I did with https://github.com/lytics/httppprof

However, in hindsight it seems like using the default HTTP server mux for debugging/monitoring is idiomatic, so I'm actually leaning towards just enabling both libraries by default.

schmichael avatar Oct 06 '14 17:10 schmichael

I'm ok with that, so long as it doesn't turn on the http server.

epsniff avatar Oct 06 '14 18:10 epsniff