StateTrackingHandler

StateTrackingHandler (described here) is a troubleshooting Handler that can be inserted in the Handler chain to track usages of Handler/Request/Response asynchronous APIs.

Dumping the Jetty component tree will dump the StateTrackingHandler, which will dump the state of the current requests.

This will help detecting whether requests are not completed due to callbacks not being completed, or whether callback code is stuck while invoking blocking APIs, etc.

Thread stack traces (including virtual threads) of operations that have been started but not completed, or are stuck in blocking code are provided in the component tree dump.