forked from ooyala/go-dogstatsd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
house keeping, dogstatsd->statsd, doc fixes
- Loading branch information
Showing
4 changed files
with
50 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## Overview | ||
|
||
Package `statsd` provides a Go [dogstatsd](http://docs.datadoghq.com/guides/dogstatsd/) client. Dogstatsd extends Statsd, adding tags | ||
and histograms. | ||
|
||
## Get the code | ||
|
||
$ go get github.com/DataDog/datadog-go/statsd | ||
|
||
## Usage | ||
|
||
```go | ||
// Create the client | ||
c, err := statsd.New("127.0.0.1:8125") | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
// Prefix every metric with the app name | ||
c.Namespace = "flubber." | ||
// Send the EC2 availability zone as a tag with every metric | ||
append(c.Tags, "us-east-1a") | ||
err = c.Gauge("request.duration", 1.2, nil, 1) | ||
``` | ||
|
||
## Buffering Client | ||
|
||
Dogstatsd accepts packets with multiple statsd payloads in them. Using the BufferingClient via `NewBufferingClient` will buffer up commands and send them when the buffer is reached or after 100msec. | ||
|
||
## Development | ||
|
||
Run the tests with: | ||
|
||
$ go test | ||
|
||
## Documentation | ||
|
||
Please see: http://godoc.org/github.com/DataDog/datadog-go/statsd | ||
|
||
## License | ||
|
||
go-dogstatsd is released under the [MIT license](http://www.opensource.org/licenses/mit-license.php). | ||
|
||
## Credits | ||
|
||
Original code by [ooyala](https://github.com/ooyala/go-dogstatsd). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Copyright 2013 Ooyala, Inc. | ||
|
||
package dogstatsd | ||
package statsd | ||
|
||
import ( | ||
"fmt" | ||
|