executor.queued
metrics of ForkJoinPool should include queued submissions
#5650
Labels
executor.queued
metrics of ForkJoinPool should include queued submissions
#5650
Please describe the feature request.
A clear and concise description of what you would like to be able to do with Micrometer and cannot currently.
In
io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics#monitor(io.micrometer.core.instrument.MeterRegistry, java.util.concurrent.ForkJoinPool)
theexecutor.queued
metrics is bound toForkJoinPool::getQueuedTaskCount
.The javadoc for
ForkJoinPool::getQueuedTaskCount
states:Now, in ForkJoinPool there is aslo
getQueuedSubmissionCount()
with this javadoc;The current bindings completely ignores the
getQueuedSubmissionCount()
. One solution might be to just bindexecutor.queued
to the sum ofgetQueuedTaskCount()
andgetQueuedSubmissionCount()
. Another solution might be to have them both bound toexecutor.queued
but with different additional tags (but that might be considered a breaking change, and align badly with metrics on other types of ExecutorServices?).Rationale
In my opinion it is more interesting to monitor the queued submissions than the queued tasks (in ForkJoinPool terminology) since when the pool threads are not able to keep up with the submission, they will pile up in queued submissions (but the number of queued tasks remain at 0 in my experience).
The text was updated successfully, but these errors were encountered: