Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gumieri/go-statsd
A extremely simple statsd client for Go
https://github.com/gumieri/go-statsd
Last synced: 15 days ago
JSON representation
A extremely simple statsd client for Go
- Host: GitHub
- URL: https://github.com/gumieri/go-statsd
- Owner: gumieri
- License: mit
- Created: 2019-10-06T22:30:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-16T02:16:50.000Z (about 5 years ago)
- Last Synced: 2024-12-08T07:42:47.006Z (17 days ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Statsd
A extremely simple Statsd client for Go.
## Installation
```bash
go get -u github.com/gumieri/go-statsd
```This project is a Go library. Intended to be used by another Go programs.
## Usage
```go
import "github.com/gumieri/statsd"client := statsd.New("localhost", 8125)
err := client.Send(&statsd.Metric{
Name: "test", // string
Value: 1, // float64
Type: statsd.Counter, // statsd.Gauge, statsd.Millisecond, statsd.Histogram or statsd.Set
SampleRate: 0.33, // float64
Tags: []statsd.Tag{
{Key: "oneKey", Value: "oneValue"},
{Key: "twoKey", Value: "twoValue"},
},
})
```There is also a `TrySend` which does not return any error:
```go
client.TrySend(&statsd.Metric{
Name: "test",
Value: 1,
Type: statsd.Counter,
})
```## Code Status
[![Go Report Card](https://goreportcard.com/badge/github.com/gumieri/go-statsd)](https://goreportcard.com/report/github.com/gumieri/go-statsd)
[![GoDoc](https://godoc.org/github.com/gumieri/go-statsd?status.svg)](https://godoc.org/github.com/gumieri/go-statsd)## License
Note is released under the [MIT License](http://www.opensource.org/licenses/MIT).