rmahindra123 commented on code in PR #13851:
URL: https://github.com/apache/hudi/pull/13851#discussion_r2335132003


##########
hudi-common/src/main/java/org/apache/hudi/metrics/prometheus/PrometheusReporter.java:
##########
@@ -70,25 +101,39 @@ public PrometheusReporter(HoodieMetricsConfig 
metricsConfig, MetricRegistry regi
           });
     }
     metricExports = new DropwizardExports(registry, new 
LabeledSampleBuilder(labelNames, labelValues));
-    this.collectorRegistry = PORT_TO_COLLECTOR_REGISTRY.get(serverPort);
+    
+    PrometheusServerState serverState = getServerState(serverPort);
+    this.collectorRegistry = serverState.getCollectorRegistry();
     metricExports.register(collectorRegistry);
+    serverState.getExports().add(metricExports);
+    serverState.getReferenceCount().incrementAndGet();

Review Comment:
   can u move this within getServerState?



-- 
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