-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add UDS support #42
Add UDS support #42
Conversation
Hello @erks, The code is manually tested and ready for code review, I need to work on the unit testing before merging it. As we are currently focusing on the 6.2.0 release, I hope I'll be able to return to it in 2 weeks. In the meantime, feedback on the PR and testing with your use case would be greatly appreciated. |
@xvello No, I did not, unfortunately. |
Any update on this PR? Exciting feature! |
Hey, apologies for the delay. Having a look at this today! Thanks for the improvements!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks 💯 Thanks! I was able to test this manually and submit metrics through the unix socket. Also, thanks for the tests!
This PR adds support for submission of custom metrics through a Unix Socket on Linux.
See https://docs-staging.datadoghq.com/xvello/dsd_uds/developers/dogstatsd/unix_socket/ and https://github.com/DataDog/datadog-agent/wiki/Unix-Domain-Sockets-support for context and benefits.
Implementation details:
0
as port, the socket path ashostname
100ms
. It only triggers if dogstatsd is overloaded/frozen and the socket buffer is full. The equivalent in UDP is a full reception buffer, triggering a silent packet dropTesting
UnixSocketTest
test class to test good transmission + error handling and recoveryWindows
The feature is Linux only, and requires an external
jnr.unixsocket
JNI library. This library provides NOOP stubs for unsupported OSes, so the library still compiles and operates in UDP mode with no dark magic.Tests pass on windows, all of the
UnixSocketTest
class is ignored of course. As with Linux, theNonBlockingStatsDClientPerfTest
test is still a bit flaky.