mlbiscoc commented on code in PR #2613: URL: https://github.com/apache/solr/pull/2613#discussion_r1701057393
########## solr/core/src/test/org/apache/solr/response/TestPrometheusResponseWriter.java: ########## @@ -78,7 +78,12 @@ public void testPrometheusStructureOutput() throws Exception { output.lines().filter(line -> !line.startsWith("#")).collect(Collectors.toList()); filteredResponse.forEach( (actualMetric) -> { - String actualValue = actualMetric.substring(actualMetric.lastIndexOf("} ") + 1); + String actualValue; + if (actualMetric.contains("}")) { + actualValue = actualMetric.substring(actualMetric.lastIndexOf("} ") + 1); + } else { + actualValue = actualMetric.split(" ")[1]; + } Review Comment: Also adding this in to better parse numeric value out of prometheus metrics based on whether or not tags exist -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org