qingwei91 commented on code in PR #21403:
URL: https://github.com/apache/flink/pull/21403#discussion_r1032920245


##########
flink-metrics/flink-metrics-prometheus/src/main/java/org/apache/flink/metrics/prometheus/AbstractPrometheusReporter.java:
##########
@@ -378,6 +390,22 @@ private void addSamples(
                                 addToList(labelValues, quantile.toString()),
                                 statistics.getQuantile(quantile)));
             }
+            if (this.histogramMaxEnabled) {
+                samples.add(
+                        new MetricFamilySamples.Sample(
+                                metricName,
+                                labelNamesWithQuantile,
+                                addToList(labelValues, "1.0"),
+                                statistics.getMax()));
+            }
+            if (this.histogramMinEnabled) {
+                samples.add(
+                        new MetricFamilySamples.Sample(
+                                metricName,
+                                labelNamesWithQuantile,
+                                addToList(labelValues, "0.0"),
+                                statistics.getMin()));
+            }

Review Comment:
   Core of the changes, emit max as 1.0 and min as 0.0 when reporting to 
prometheus



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