You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "codope (via GitHub)" <gi...@apache.org> on 2023/02/16 16:25:13 UTC

[GitHub] [hudi] codope commented on a diff in pull request #7933: [HUDI-5774] Fix prometheus configs for metadata table and support metric labels

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


##########
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:
   What if labels are not in the format `key:value`? Should we add a validation or handle this scenario?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org