nastra commented on code in PR #6023:
URL: https://github.com/apache/iceberg/pull/6023#discussion_r1000931892
##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -304,12 +304,16 @@ private void reportMetrics(
MetricsReport report,
Supplier<Map<String, String>> headers) {
reporter.report(report);
- client.post(
- paths.metrics(tableIdentifier),
- ReportMetricsRequest.of(report),
- null,
- headers,
- ErrorHandlers.defaultErrorHandler());
+ try {
+ client.post(
+ paths.metrics(tableIdentifier),
+ ReportMetricsRequest.of(report),
+ null,
+ headers,
+ ErrorHandlers.defaultErrorHandler());
+ } catch (Exception e) {
+ LOG.warn("Failed to report metrics to REST endpoint for table {}",
tableIdentifier, e);
Review Comment:
it's being printed to the log right outside the try-catch block, so not sure
we'd want to repeat the report details in this warning message
--
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]