merlimat commented on a change in pull request #1209: Fixed missing '"' sign in system metrics for Prometheus URL: https://github.com/apache/incubator-pulsar/pull/1209#discussion_r167297551
########## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java ########## @@ -85,14 +85,13 @@ private static void generateSystemMetrics(SimpleTextOutputStream stream, String for (int i = 0; i < metricFamily.samples.size(); i++) { Sample sample = metricFamily.samples.get(i); stream.write(sample.name); - stream.write("{cluster=\"").write(cluster).write("\","); + stream.write("{cluster=\"").write(cluster).write('"'); Review comment: Yes, in the previous commit I did add a parser for the Prometheus text format to verify the metrics in the unit tests. Though, the parser is regex based and it's not validating 100% the format. In this PR I added the check to get the value of the tag, so that it was failing before the fix and passing after. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services