kezhuw commented on code in PR #2279: URL: https://github.com/apache/zookeeper/pull/2279#discussion_r2225592721
########## zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java: ########## @@ -714,14 +714,21 @@ public Thread newThread(final Runnable runnable) { } } + private static class PrometheusRejectedExecutionHandler implements RejectedExecutionHandler { + private static boolean maxQueueSizeExceeded = false; + + @Override + public void rejectedExecution(final Runnable r, final ThreadPoolExecutor e) { + if (!maxQueueSizeExceeded) { + maxQueueSizeExceeded = true; + LOG.warn("Prometheus metrics queue size exceeded the max"); Review Comment: Why drop the rate limit logger ? I would expect rejections are periodically events but not a lifetime event. -- 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. To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org