code: public void collectThreadPool(ServerConfig serverConfig, final ThreadPoolExecutor threadPoolExecutor) {
          try {
  
              int coreSize = serverConfig.getCoreThreads();
              int maxSize = serverConfig.getMaxThreads();
              int queueSize = serverConfig.getQueues();
  
              final ThreadPoolConfig threadPoolConfig = new ThreadPoolConfig(coreSize, maxSize, queueSize);
  
              Lookout.registry().info(rpcLookoutId.fetchServerThreadConfigId(serverConfig), new Info<ThreadPoolConfig>() {
  
                  @Override
                  public ThreadPoolConfig value() {
                      return threadPoolConfig;
                  }
              });
  
              Lookout.registry().gauge(rpcLookoutId.fetchServerThreadPoolActiveCountId(serverConfig),
                  new Gauge<Integer>() {
  
                      @Override
                      public Integer value() {
                          return threadPoolExecutor.getActiveCount();
                      }
                  });
  
              Lookout.registry().gauge(rpcLookoutId.fetchServerThreadPoolIdleCountId(serverConfig), new Gauge<Integer>() {
  
                  @Override
                  public Integer value() {
                      return threadPoolExecutor.getPoolSize() - threadPoolExecutor.getActiveCount();
                  }
              });
  
              Lookout.registry().gauge(rpcLookoutId.fetchServerThreadPoolQueueSizeId(serverConfig), new Gauge<Integer>() {
  
                  @Override
                  public Integer value() {
                      return threadPoolExecutor.getQueue().size();
                  }
              });
          } catch (Throwable t) {
              LOGGER.error(LogCodes.getLog(LogCodes.ERROR_METRIC_REPORT_ERROR), t);
          }
      }
docs: Collect the thread pool information
  
  @param serverConfig       ServerConfig
  @param threadPoolExecutor ThreadPoolExecutor