Collecting metrics

In addition to general information about your app, it can be helpful to emit metrics that are app-specific. For example, we might want to collect timing data or keep track of the number of times an event occurs.

This recipe will use the github.com/rcrowley/go-metrics package to collect metrics and expose them via an endpoint. There are various exporter tools that you can use to export metrics to places such as Prometheus and InfluxDB, which are also written in Go.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.161.116