Categorygithub.com/hamba/statter/v2
package
2.8.0
Repository: https://github.com/hamba/statter.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

Logo

Go Report Card Build Status Coverage Status Go Reference GitHub release GitHub license

Go stats clients

Overview

Install with:

go get github.com/hamba/statter/v2

Supported stats clients

  • L2met Writes l2met to a Logger interface
  • 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.

Usage

reporter := statsd.New(statsdAddr, "")
stats := statter.New(reporter, 10*time.Second).With("my-prefix")

stats.Counter("my-counter", tags.Str("tag", "value")).Inc(1)