You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/12/18 20:13:47 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6436: Core: Add flag to control sending metric reports via REST

rdblue commented on code in PR #6436:
URL: https://github.com/apache/iceberg/pull/6436#discussion_r1051658603


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -316,14 +324,18 @@ private void reportMetrics(
       TableIdentifier tableIdentifier,
       MetricsReport report,
       Supplier<Map<String, String>> headers) {
-    reporter.report(report);
     try {
-      client.post(
-          paths.metrics(tableIdentifier),
-          ReportMetricsRequest.of(report),
-          null,
-          headers,
-          ErrorHandlers.defaultErrorHandler());
+      reporter.report(report);
+      if (reportingViaRestEnabled) {
+        client.post(
+            paths.metrics(tableIdentifier),
+            ReportMetricsRequest.of(report),
+            null,
+            headers,
+            ErrorHandlers.defaultErrorHandler());
+      } else {
+        LOG.debug("Reporting metrics to REST endpoint is disabled");

Review Comment:
   I don't think this is a helpful debug message every time a report may go out. There isn't anything specific to the report here. I'd rather remove this. If we want to have a debug log for config properties, then we can log when we set `reportingViaRestEnabled`.



-- 
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-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org