diff --git a/README.md b/README.md index d36254fe..c6f6774e 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,13 @@ import ( ) func newScope() (tally.Scope, io.Closer) { - statter, _ := statsd.NewBufferedClient("127.0.0.1:8125", - "stats", 100*time.Millisecond, 1440) + statter, _ := statsd.NewClientWithConfig(&statsd.ClientConfig{ + Address: "127.0.0.1:8125", + Prefix: "stats", + UseBuffered: true, + FlushInterval: 100*time.Millisecond, + FlushBytes: 1440, + }) reporter := tallystatsd.NewReporter(statter, tallystatsd.Options{ SampleRate: 1.0, @@ -75,7 +80,7 @@ func newScope() (tally.Scope, io.Closer) { scope, closer := tally.NewRootScope(tally.ScopeOptions{ Prefix: "my-service", Tags: map[string]string{}, - Reporter: r, + Reporter: reporter, }, time.Second) return scope, closer