Skip to content

Commit

Permalink
house keeping, dogstatsd->statsd, doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoiron committed Aug 11, 2014
1 parent 98d859d commit f3a2ecd
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 46 deletions.
42 changes: 0 additions & 42 deletions README.markdown

This file was deleted.

45 changes: 45 additions & 0 deletions statsd/README.md
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).
7 changes: 4 additions & 3 deletions dogstatsd.go → statsd/statsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ histograms. Refer to http://docs.datadoghq.com/guides/dogstatsd/ for information
Example Usage:
// Create the client
c, err := dogstatsd.New("127.0.0.1:8125")
c, err := statsd.New("127.0.0.1:8125")
if err != nil {
log.Fatal(err)
}
Expand All @@ -16,9 +16,10 @@ Example Usage:
append(c.Tags, "us-east-1a")
err = c.Gauge("request.duration", 1.2, nil, 1)
dogstatsd is based on go-statsd-client.
statsd is based on go-statsd-client.
*/
package dogstatsd

package statsd

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion dogstatsd_test.go → statsd/statsd_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013 Ooyala, Inc.

package dogstatsd
package statsd

import (
"fmt"
Expand Down

0 comments on commit f3a2ecd

Please sign in to comment.