reactor-netty icon indicating copy to clipboard operation
reactor-netty copied to clipboard

Event loop task duration tracking

Open osi opened this issue 4 years ago • 3 comments

Similar to #1398, it would be nice to be able to track the duration of event loop tasks.

Reactor is able to do this for its schedulers via Schedulers.enableMetrics.

Additionally, it would be nice to set a threshold for the duration of any given task, and be able to log an event with details about that task (for identifying specific instances in the metrics)

osi avatar Dec 15 '20 18:12 osi

Full monitoring may cause redundant information and excessive performance loss.

Is it more reasonable to perform sampling of this part of the function?

like: sample(() -> Schedulers.enableMetrics, (Predicate) () -> { /* Trigger threshold */ });

kevinten10 avatar Dec 18 '20 10:12 kevinten10

Sampling may be fine. My goal is to identify work taking place on an event loop thread that is effectively blocking the loop due to how long it takes. (even if the work is fully non-blocking).

osi avatar Dec 18 '20 20:12 osi