You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/04/16 07:24:27 UTC

[GitHub] [druid] abhishekagarwal87 commented on a change in pull request #11113: Add more metrics for Jetty server thread pool usage

abhishekagarwal87 commented on a change in pull request #11113:
URL: https://github.com/apache/druid/pull/11113#discussion_r614618937



##########
File path: server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java
##########
@@ -499,6 +503,23 @@ public boolean doMonitor(ServiceEmitter emitter)
       final ServiceMetricEvent.Builder builder = new ServiceMetricEvent.Builder();
       MonitorUtils.addDimensionsToBuilder(builder, dimensions);
       emitter.emit(builder.build("jetty/numOpenConnections", ACTIVE_CONNECTIONS.get()));
+      ThreadPool jettyServerThreadPool = JETTY_SERVER_THREAD_POOL.get();
+      emitter.emit(builder.build("jetty/threadPoolNumTotalThreads", jettyServerThreadPool.getThreads()));
+      emitter.emit(builder.build("jetty/threadPoolNumIdleThreads", jettyServerThreadPool.getIdleThreads()));
+      emitter.emit(builder.build("jetty/threadPoolIsLowOnThreads", jettyServerThreadPool.isLowOnThreads() ? 1 : 0));
+      if (jettyServerThreadPool instanceof ThreadPool.SizedThreadPool) {

Review comment:
       when will this be true? As in, where is threadpool of this type being configured? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org