Hi Tomcat Devs, Hope you guys are having a great day. I'm a new developer to this area so do let me know if I have any misconceptions or errors in my thinking.
I am currently using Tomcat as an embedded web server within a Spring Boot Application, and I utilise Micrometer to expose Tomcat metrics, such as tomcat_servlet_request_seconds. I was thinking if it'd be useful to include a metric that tracks the latency experienced in terms of time spent in the Tomcat queue. I understand that each request is added to a TaskQueue (default implementation) by the poller thread, and the internal executor service created will assign a thread to each task. However, the current metrics only track the time after polling from the queue, and passed down through filters etc to the dispatcher servlet. (tomcat_servlet_request_seconds). In reality, I understand the total delay experienced by the client should include the time spent in the queue as well, since there could be a case where there are no available threads to service incoming requests. Would this metric serve a good use case? Or are there already similar metrics out there? I'm currently on Tomcat 9.0.63 if that helps. Thank you! Regards Andy