|
|
@ -58,8 +58,10 @@ public class AdapterThreadPoolMicrometerMonitorHandler extends AbstractAdapterTh
|
|
|
|
Tag.of(APPLICATION_NAME_TAG, applicationName));
|
|
|
|
Tag.of(APPLICATION_NAME_TAG, applicationName));
|
|
|
|
Metrics.gauge(metricName("core.size"), tags, threadPoolAdapterState, ThreadPoolAdapterState::getCoreSize);
|
|
|
|
Metrics.gauge(metricName("core.size"), tags, threadPoolAdapterState, ThreadPoolAdapterState::getCoreSize);
|
|
|
|
Metrics.gauge(metricName("maximum.size"), tags, threadPoolAdapterState, ThreadPoolAdapterState::getMaximumSize);
|
|
|
|
Metrics.gauge(metricName("maximum.size"), tags, threadPoolAdapterState, ThreadPoolAdapterState::getMaximumSize);
|
|
|
|
|
|
|
|
if (threadPoolAdapterState.getBlockingQueueCapacity() != null) {
|
|
|
|
Metrics.gauge(metricName("queue.capacity"), tags, threadPoolAdapterState, ThreadPoolAdapterState::getBlockingQueueCapacity);
|
|
|
|
Metrics.gauge(metricName("queue.capacity"), tags, threadPoolAdapterState, ThreadPoolAdapterState::getBlockingQueueCapacity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String metricName(String name) {
|
|
|
|
private String metricName(String name) {
|
|
|
|
return String.join(".", METRIC_NAME_PREFIX, name);
|
|
|
|
return String.join(".", METRIC_NAME_PREFIX, name);
|
|
|
|