-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(statsd receiver): enable use of unix domain sockets #16421
base: master
Are you sure you want to change the base?
Conversation
Thanks so much for the pull request! |
!signed-cla |
…ruct Summary: Later in this stack of diffs, I add a field named `MaxConnections` to `Statsd` because it controls the max number of connections for all listener types, not just TCP listeners. That creates a naming collision with the existing field named `MaxConnections`, which is an internal stat tracker. This diff eliminates that name collision by encapsulating all of `Statsd`'s internal stat trackers in a struct. Test Plan: Existing unit tests pass.
Summary: Later in this stack of diffs, I rename `TCPlistener` to `Listener` because it becomes a generic listener for all networks supported by `net.Listen`. That makes `UDPlistener`'s naming stand out because: - It isn't a listener. It's a `*net.UDPConn`. - It isn't the UDP counterpart to `Listener`. This diff renames it to `UDPConn` to improve clarity. Test Plan: Unit tests pass.
Summary: The statsd receiver currently only supports UDP and TCP connections, but the TCP code does very little that's actually unique to TCP. This diff adds support for unix domain sockets and other flavors of TCP (`tcp4`, `tcp6`) by refactoring the statsd receiver to use `net.Listener` instead of `*net.TCPListener`. Test Plan: Added unit test coverage for unix domain sockets and the tests pass.
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Summary:
The statsd receiver currently only supports UDP and TCP connections, but the TCP code does very little that's actually unique to TCP. This diff adds support for unix domain sockets and other flavors of TCP (
tcp4
,tcp6
) by refactoring the statsd receiver to usenet.Listener
instead of*net.TCPListener
.Test Plan:
Added unit test coverage for unix domain sockets and the tests pass.
Stack created with Sapling. Best reviewed with ReviewStack.