lokeshj1703 commented on code in PR #7933:
URL: https://github.com/apache/hudi/pull/7933#discussion_r1109412024


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/prometheus/PushGatewayMetricsReporter.java:
##########
@@ -77,4 +83,11 @@ private String getJobName() {
     }
     return configuredJobName;
   }
+
+  private static Map<String, String> parseLabels(String labels) {
+    return Pattern.compile("\\s*,\\s*")
+        .splitAsStream(labels.trim())
+        .map(s -> s.split(":", 2))

Review Comment:
   Currently the way it behaves, it will convert input like 
   ```
   "hudi:prometheus" -> "hudi" and "prometheus"
   "hudi:prome:theus" -> "hudi" and "prome:theus"
   "hudiprometheus" -> "hudiprometheus" and ""
   ```
   This looks fine to me or do we want more stricter rules here?



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