Go stats clients
Install with:
go get github.com/hamba/statter/v2- L2met Writes l2met to a
Loggerinterface - Statsd Writes statsd to
UDP - Prometheus Exposes stats via
HTTP - VictoriaMetrics Exposes stats via
HTTP
Note: This project has renamed the default branch from master to main. You will need to update your local environment.
reporter := statsd.New(statsdAddr, "")
stats := statter.New(reporter, 10*time.Second).With("my-prefix")
stats.Counter("my-counter", tags.Str("tag", "value")).Inc(1)