nastra commented on code in PR #6436:
URL: https://github.com/apache/iceberg/pull/6436#discussion_r1051888053
##########
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:
fair enough, I've removed the debug logging here and rebased the PR
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]