Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

statsd metrics are limited to 512 bytes #123

Open
andrewhamon opened this issue Mar 23, 2022 · 3 comments
Open

statsd metrics are limited to 512 bytes #123

andrewhamon opened this issue Mar 23, 2022 · 3 comments

Comments

@andrewhamon
Copy link

andrewhamon commented Mar 23, 2022

When sending a UDP statsd message, this library always allocates a fixed 512 ByteBuffer. If the data size exceeds this, copying into this buffer will throw a java.nio.BufferOverflowException.

Something like ByteBuffer.wrap is probably more appropriate.

@toxicafunk
Copy link
Collaborator

I´m having issues publishing a ZIO2.0 compatible version, once that´s done I´ll see if i can fix this. Ofc, PRs are always welcomed :-)

@andrewhamon
Copy link
Author

Yep, my coworker I think has talked to you on discord, we have a handful of changes we'd like to upstream if possible (some may be more controversial than others) 😸

@ollyw
Copy link

ollyw commented Jul 26, 2022

@andrewhamon thanks for putting in these tickets. I am looking at integrating the metrics into prod for a high throughput service and looked at the code and found concerns and was going to put in tickets, but see you have already found and reported the issues. Another minor area for improvement could be to minimise garbage generation e.g. Using ByteBuffer.allocate in UDPClient.send rather than ByteBuffer.wrap seems suboptimal.

Are you planning to upstream some of the changes that you and your coworker have been working on? It would be really handy to have them

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants