Skip to content

Make Statsd protocol configurable to enable UDP#47

Closed
armsnyder wants to merge 1 commit intolyft:masterfrom
armsnyder:feature/udp
Closed

Make Statsd protocol configurable to enable UDP#47
armsnyder wants to merge 1 commit intolyft:masterfrom
armsnyder:feature/udp

Conversation

@armsnyder
Copy link
Copy Markdown
Contributor

@armsnyder armsnyder commented Nov 20, 2018

This change adds an additional setting - STATSD_PROTOCOL - which defaults to "tcp"

The STATSD_PROTOCOL is now used instead of the previously hardcoded "tcp" when dialing the connection.

Because the TCPStatsdSink sink is no longer TCP-specific, I renamed it "NetworkStatsdSink". I did this instead of creating a new UDPStatsdSink because the change was so minimal.

I have tested this change by compiling it and using it in the Lyft Rate Limiter to output stats to a UDP StatsD server (DataDog). I saw the stats show up, and logs indicated everything worked as intended.

closes #41

@armsnyder
Copy link
Copy Markdown
Contributor Author

The CI is failing for Go 1.7 and 1.8, but not due to my change --

../../../golang.org/x/tools/go/internal/gcimporter/bexport.go:212: obj.IsAlias undefined (type *types.TypeName has no field or method IsAlias)

Go 1.9 and 1.10 are passing.

@btc
Copy link
Copy Markdown
Contributor

btc commented Jan 17, 2019

@armsnyder you will need to rebase to pick up the changes that fix the failure you're seeing

@charlievieth
Copy link
Copy Markdown
Contributor

Thanks for this PR, UDP support has been added in #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UDP Support

3 participants