Open ynojima opened 8 months ago
/cc @ebullient (metrics), @jmartisk (metrics)
I think a possible implementation plan is to change https://github.com/quarkusio/quarkus/blob/6f8c261711e36462497254436f216efb926b7119/extensions/smallrye-context-propagation/deployment/src/main/java/io/quarkus/smallrye/context/deployment/SmallRyeContextPropagationProcessor.java#L106 to use a proxy executor for the smallrye executor, which then submits proxy tasks to smallrye to allow timing when these tasks are started and finished. That is the information needed to provide useful metrics for this pool. This would of course only be the case if a metrics extension is present.
I'd be willing to implement this (our company had some issues with the main thread pool filling up and we'd like to monitor this), if I get a greenlight from @ebullient or @jmartisk that the above setup would be good implementation.
If you want to monitor the duration of tasks, then a proxy executor does seem like the way to go, however it might be best to do this at the lowest level (wrap the EnhancedQueueExecutor
directly) rather than above SmallRye.
There are some other metrics that are already readily available on the EnhancedQueueExecutor
API which might be of use as well.
Description
In my understanding, blocking tasks are executed with main thread pool (executor-thread), not with vert-x thread pool (vert.x-worker-thread) from quarkus 1.1.0.Final. https://github.com/quarkusio/quarkus/pull/6217
resteasy(-classic) resource log indicates it is executed with
executor-thread-<n>
.But Micrometer only emits worker_pool metrics for
vert.x-internal-blocking
andvert.x-worker-thread
.We should have metrics for the main thread pool (executor-thread) too.
Implementation ideas
No response