Skip to content

Commit

Permalink
Fixed the observable collection thread pool indicator (#12087)
Browse files Browse the repository at this point in the history
Co-authored-by: robin <pengrobin607@gmail.com>
  • Loading branch information
robin977 and robin authored Apr 13, 2023
1 parent 7e3064f commit ff4c1e8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,7 @@ private void onStarted() {
return;
}
setStarted();
startMetricsCollector();
if (logger.isInfoEnabled()) {
logger.info(getIdentifier() + " is ready.");
}
Expand All @@ -1146,7 +1147,12 @@ private void onStarted() {
}
}


private void startMetricsCollector() {
DefaultMetricsCollector collector = applicationModel.getBeanFactory().getBean(DefaultMetricsCollector.class);
if (Objects.nonNull(collector) && collector.isThreadpoolCollectEnabled()) {
collector.registryDefaultSample();
}
}
private void completeStartFuture(boolean success) {
if (startFuture != null) {
startFuture.complete(success);
Expand Down

0 comments on commit ff4c1e8

Please sign in to comment.