Skip to content
This repository was archived by the owner on Oct 6, 2020. It is now read-only.

sendgrid/go-statsdclient

 
 

Repository files navigation

go-statsdclient

go-statsdclient is a client library for statsd written in Go.

Installation

Download and install :

$ go get -u -v github.com/sendgrid/go-statsclient

Add it to your code :

import "github.com/sendgrid/go-statsdclient"

Use

c := statsdclient.Dial("localhost:8125")

c.SetPrefix(os.Getenv("APP_STATSD_PREFIX"))

c.Increment("incr", 1, 1)
c.Decrement("decr", 1, 0.1)
c.Timing("timer", 320, 0.1)
c.Time("timer", 0.1, func() {
        // do something  
})
c.Gauge("gauge", 30, 1)
c.Unique("unique", 765, 1)

About

A client library for statsd written in Go (forked from cyberdelia/statsd)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 98.0%
  • Shell 2.0%