Stats is a statistics collection library for your Go applications. It collects data on a regular, configurable interval and sends it to a configurable collections client.
- Memory usage
- Goroutines
- Garbage Collection
- CGO Calls
- statsd
package main
import (
"github.com/jelmersnoeck/stats"
"github.com/jelmersnoeck/stats/clients/statsd"
)
func main() {
cl, err := statsd.New()
if err != nil {
// error connecting to statsd
}
s := stats.New(stats.Client(cl))
go s.Collect()
}