https://github.com/hamba/statter
Go stats clients
https://github.com/hamba/statter
golang l2met statsd
Last synced: 6 months ago
JSON representation
Go stats clients
- Host: GitHub
- URL: https://github.com/hamba/statter
- Owner: hamba
- License: mit
- Created: 2019-02-13T07:12:26.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-05-12T14:20:01.000Z (8 months ago)
- Last Synced: 2025-05-12T15:39:12.658Z (8 months ago)
- Topics: golang, l2met, statsd
- Language: Go
- Size: 251 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

[](https://goreportcard.com/report/github.com/hamba/statter)
[](https://github.com/hamba/statter/actions)
[](https://coveralls.io/github/hamba/statter?branch=master)
[](https://pkg.go.dev/github.com/hamba/statter/v2)
[](https://github.com/hamba/statter/releases)
[](https://raw.githubusercontent.com/hamba/statter/master/LICENSE)
Go stats clients
## Overview
Install with:
```shell
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
```go
reporter := statsd.New(statsdAddr, "")
stats := statter.New(reporter, 10*time.Second).With("my-prefix")
stats.Counter("my-counter", tags.Str("tag", "value")).Inc(1)
```