DaanHoogland commented on code in PR #13650:
URL: https://github.com/apache/cloudstack/pull/13650#discussion_r4185259668


##########
plugins/integrations/prometheus/src/main/java/org/apache/cloudstack/metrics/PrometheusExporterImpl.java:
##########
@@ -491,13 +490,20 @@ private void addVMsBySizeMetrics(final List<Item> 
metricsList, final long dcId,
     }
 
     @Override
-    public void updateMetrics() {
+    public synchronized void updateMetrics() {
+        final long minIntervalMs = 
TimeUnit.SECONDS.toMillis(PrometheusExporterServer.PrometheusExporterMinRefreshInterval.value());
+        final long now = System.currentTimeMillis();

Review Comment:
   @Damans227 I think the risk you signal here is still there, but thanks. It 
should be reduced a bit at least.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to