Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.17.0
-
None
Description
When runing unit test 'org.apache.flink.metrics.prometheus.PrometheusReporterTest#metricIsRemovedWhileOtherMetricsWithSameNameExist', it got wrong response string as
# HELP flink_logical_scope_metric metric (scope: logical_scope) # TYPE flink_logical_scope_metric gauge flink_logical_scope_metric{label1="some_value",label2="value1",} 0.0
in my opinion, the expected right response is :
# HELP flink_logical_scope_metric metric (scope: logical_scope) # TYPE flink_logical_scope_metric gauge flink_logical_scope_metric{label1="value1",label2="some_value",} 0.0
The reason may be we create two metric with same name, but two different order label-keys in the variables of MetricGroup. And we don't sort the key&value in variables within methond 'org.apache.flink.metrics.prometheus.AbstractPrometheusReporter#notifyOfAddedMetric'.
Maybe it won't happen in production env now, howerver it's important to ensure the robustness of method with unpected input param.
Attachments
Attachments
Issue Links
- links to