Hacker News new | past | comments | ask | show | jobs | submit login

Nice! I didn't knew about gosensors library.

I started with the same path, using github.com/prometheus/client_golang/prometheus, but it exported too many application metrics (an order of magnitude more than the sensors I exported :p), so I went to a more custom approach.




You can disable the default metrics by using the uninstrumented handler https://godoc.org/github.com/prometheus/client_golang/promet...

It's a best practice to export all available metrics though, you'll likely run into situations where you'll need them. It's not that many time series exported by default which shouldn't cause any problems.


Metrics are pretty cheap, unless you have a ton of exporters I wouldn't worry too much about that. Plus it can come in handy: the ZFS exporter I wrote uses a CGO library that had a memory leak, which I discovered thanks to those app metrics. And they made it easy to infer that the leak was in the C heap rather than in Go.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: