diff --git a/addons/common/monitoring/core/src/main/java/org/kie/kogito/monitoring/core/common/process/MetricsProcessEventListener.java b/addons/common/monitoring/core/src/main/java/org/kie/kogito/monitoring/core/common/process/MetricsProcessEventListener.java index 92ddf1241e8..007c1aa4bde 100644 --- a/addons/common/monitoring/core/src/main/java/org/kie/kogito/monitoring/core/common/process/MetricsProcessEventListener.java +++ b/addons/common/monitoring/core/src/main/java/org/kie/kogito/monitoring/core/common/process/MetricsProcessEventListener.java @@ -18,8 +18,8 @@ */ package org.kie.kogito.monitoring.core.common.process; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; @@ -49,7 +49,7 @@ public class MetricsProcessEventListener extends DefaultKogitoProcessEventListener { private static final Logger LOGGER = LoggerFactory.getLogger(MetricsProcessEventListener.class); - private static Map gaugeMap = new HashMap<>(); + private static Map gaugeMap = new ConcurrentHashMap<>(); private final String identifier; private final KogitoGAV gav; private final MeterRegistry meterRegistry;