sk0x50 commented on code in PR #1098:
URL: https://github.com/apache/ignite-3/pull/1098#discussion_r980122092


##########
modules/metrics/src/main/java/org/apache/ignite/internal/metrics/MetricManager.java:
##########
@@ -159,4 +191,41 @@ public void disable(final String srcName) {
     public IgniteBiTuple<Map<String, MetricSet>, Long> metricSnapshot() {
         return registry.metricSnapshot();
     }
+
+    private <T extends ExporterConfiguration> void checkAndStartExporter(
+            String exporterName,
+            T exporterConfiguration) {
+        MetricExporter<T> exporter = availableExporters.get(exporterName);
+
+        if (exporter != null) {
+            exporter.init(metricsProvider, exporterConfiguration);
+
+            exporter.start();
+
+            enabledMetricExporters.put(exporter.name(), exporter);
+        } else {
+            LOG.warn("Received configuration for unknown metric exporter with 
the name '" + exporterName + "'");
+        }
+
+    }
+
+    private class ExporterConfigurationListeter implements 
ConfigurationNamedListListener<ExporterView> {
+        @Override
+        public CompletableFuture<?> 
onCreate(ConfigurationNotificationEvent<ExporterView> ctx) {

Review Comment:
   Do we have a test for that? I mean dynamic switching on/off an exporter.



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