n3nash commented on a change in pull request #2152:
URL: https://github.com/apache/hudi/pull/2152#discussion_r502179584



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/Metrics.java
##########
@@ -68,8 +69,20 @@ private void reportAndCloseReporter() {
     }
   }
 
+  private void reportAndFlushMetrics() {
+    try {
+      LOG.info("Reporting and flushing all metrics");
+
+      this.registerHoodieCommonMetrics();
+      this.reporter.report();
+      this.registry.getNames().forEach(name -> this.registry.remove(name));
+    } catch (Exception e) {
+      Metrics.LOG.warn((Object)"Error while reporting and flushing metrics", 
(Throwable)e);

Review comment:
       Can we do LOG.error ?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to