@ -17,12 +17,14 @@
package cn.hippo4j.monitor.micrometer ;
import cn.hippo4j.common.extension.spi.ServiceLoaderRegistry ;
import cn.hippo4j.core.config.ApplicationContextHolder ;
import cn.hippo4j.common.model.ThreadPoolRunStateInfo ;
import cn.hippo4j.common.toolkit.BeanUtil ;
import cn.hippo4j.common.toolkit.CollectionUtil ;
import cn.hippo4j.core.executor.state.ThreadPoolRunStateHandler ;
import cn.hippo4j.monitor.base.AbstractDynamicThreadPoolMonitor ;
import cn.hippo4j.threadpool.monitor.api.ThreadPoolMonitor ;
import cn.hippo4j.threadpool.monitor.support.MonitorTypeEnum ;
import io.micrometer.core.instrument.Metrics ;
import io.micrometer.core.instrument.Tag ;
@ -48,6 +50,10 @@ public class DynamicThreadPoolMicrometerMonitorHandler extends AbstractDynamicTh
super ( handler ) ;
}
static {
ServiceLoaderRegistry . register ( ThreadPoolMonitor . class ) ;
}
@Override
protected void execute ( ThreadPoolRunStateInfo poolRunStateInfo ) {
ThreadPoolRunStateInfo stateInfo = runStateCache . get ( poolRunStateInfo . getTpId ( ) ) ;