davidradl commented on code in PR #27165:
URL: https://github.com/apache/flink/pull/27165#discussion_r2472678684


##########
flink-metrics/flink-metrics-prometheus/src/main/java/org/apache/flink/metrics/prometheus/AbstractPrometheusReporter.java:
##########
@@ -153,31 +154,43 @@ private Collector createCollector(
             String scopedMetricName,
             String helpString) {
         Collector collector;
-        switch (metric.getMetricType()) {
-            case GAUGE:
-            case COUNTER:
-            case METER:
-                collector =
-                        io.prometheus.client.Gauge.build()
-                                .name(scopedMetricName)
-                                .help(helpString)
-                                .labelNames(toArray(dimensionKeys))
-                                .create();
-                break;
-            case HISTOGRAM:
-                collector =
-                        new HistogramSummaryProxy(
-                                (Histogram) metric,
-                                scopedMetricName,
-                                helpString,
-                                dimensionKeys,
-                                dimensionValues);
-                break;
-            default:
-                log.warn(
-                        "Cannot create collector for unknown metric type: {}. 
This indicates that the metric type is not supported by this reporter.",
-                        metric.getClass().getName());
-                collector = null;
+
+        // Special handling for checkpoint path metric - export as info-style 
metric
+        if (scopedMetricName.endsWith(CHECKPOINT_PATH_METRIC_NAME)) {
+            // Add _info suffix to follow Prometheus naming convention for 
info metrics
+            String infoMetricName = scopedMetricName + "_info";
+            @SuppressWarnings("unchecked")

Review Comment:
   what is the reason to suppress unchecked warnings here. would we not want to 
log out these warnings? 



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