Skip to content
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 unix datagram socket support #41

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

vektah
Copy link
Contributor

@vektah vektah commented Oct 28, 2024

This change allows the caller to set the network type, which allows for broader compatibility, eg with stripe/veneur unix abstract domain sockets

statsd.NewClient(
   "@veneur-socket",
    statsd.Network("unixgram"),
    statsd.TagStyle(statsd.TagFormatDatadog),
)

No change to existing behaviour. UDP is still the default.

No perf changes

BenchmarkSimple-12                      7402266               148.5 ns/op
BenchmarkSimpleUnixSocket-12            8521453               140.6 ns/op
BenchmarkComplexDelivery-12             5854812               196.4 ns/op
BenchmarkTagged-12                      2821629               423.7 ns/op
PASS
ok      github.com/smira/go-statsd      9.744s

@smira
Copy link
Owner

smira commented Oct 28, 2024

Thanks for your PR, but I guess I need to fix the CI first.

@smira smira force-pushed the add-unix-socket-support branch from f6bddf0 to cee3b7c Compare October 29, 2024 11:18
@smira smira merged commit cee3b7c into smira:main Oct 29, 2024
3 checks passed
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.

2 participants