norbert
norbert copied to clipboard
Fix bugs
There are a bunch of changes here:
- Added metrics to track the number of active threads/current threads in server thread pool.
- Added metrics in JMX to track in microseconds the total response time including the queue time, the queue time. Fixed an issue where we seem to be overwriting times in some exception handlers.
- If a request were to take longer than the stale request timeout amount we will just log where the request originated from instead of dumping the entire message into a log. This causes a bad situation to become worse.
- Currently the requestTimeoutMillis only checks time before a thread from the thread pool picks up request from the queue. It does not re-check this after the response handler is done executing the request. I have added a new parameter reponseGenerationTimeoutMillis for this precise reason. To preserve backward compatibility this is set as -1. Ideally if you want the fixed behavior you should probably set it to be the same as requestTimeoutMillis.
- For backward compatibility I have left the original metric AverageRequestProcessing timetracker as is. Instead I have created two new ones for tracking queue time and total response processing times.