-
Notifications
You must be signed in to change notification settings - Fork 139
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
Query size of single thread executor in NonBlockingStatsDClient #16
Comments
Ultimately, this depends on http://docs.oracle.com/javase/7/docs/api/java/net/DatagramSocket.html#send(java.net.DatagramPacket) being thread safe, which, as far as I can ascertain, it is. I'll have a look at introducing some more flexibility around the Executor in a forthcoming release, but I'm working on the other bugs and feature requests first. In the meantime, I'd be interested in the techniques you employ to monitor the size of an executor queue. |
Currently not using statsd-client in production, but we do monitor |
Thanks for the information -- it seems likely that I could change the statsd-client to take ownership of its own work queue in the way you describe, and to provide a way of monitoring the length of that queue. As, in the current implementation, there is only ever one running thread, monitoring that would not be necessary. I'm going to think more on this before making any changes. |
👍 |
Do you expect us to write threadlocal implementations to return the same StatsDClient per thread, remove() after request is processed or it is already done internally? How do we monitor the BlockingQueue size? Why is it called NonBlocking then? |
For a lot of metrics, it's is crucial to also monitor the size of the queue in the executor in NonBlockingStatsDClient. I propose opening up to supply a custom executor to the constructor. I think that's the most flexible solution. That said, is
NonBlockingStatsDClient#clientSocket(...)
thread safe?The text was updated successfully, but these errors were encountered: