(metrics-jetty9) InstrumentedQueuedThreadPool & InstrumentedHandler don't obey jetty Lifecycle API: can't be restarted (
hossman opened this issue · 0 comments
hossman commented
InstrumentedQueuedThreadPool
and InstrumentedHandler
do not obey the jetty Lifecycle
contract because they can't be stop()
ed and restart()
ed again later.
This is because they use their configured MetricRegistry
to register()
metrics in start()
, but never remove those registry entries in stop()
causing exceptions if the same object is started, stopped, and started again.
(Although I haven't tried using them: InstrumentedHttpChannelListener
does not appear to have the same problem, because it only registers metrics in it's constructor. Likewise InstrumentedConnectionFactory
doesn't do any Metric registration at all: the caller is required to pass in the Metric
objects to be used)