dimas-b commented on code in PR #2887:
URL: https://github.com/apache/polaris/pull/2887#discussion_r2478497368


##########
runtime/defaults/src/main/resources/application.properties:
##########
@@ -209,6 +209,11 @@ polaris.oidc.principal-roles-mapper.type=default
 # Polaris Credential Manager Config
 polaris.credential-manager.type=default
 
+# Configuration for the behaviour of the metrics endpoint
+polaris.iceberg-metrics.reporting.type=default
+# Set to INFO if you want to see iceberg metric reports printed to console

Review Comment:
   nit: it's not necessary "console" - the level will affect all log targets, 
AFAIK.



##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java:
##########
@@ -755,7 +760,16 @@ public Response reportMetrics(
       ReportMetricsRequest reportMetricsRequest,
       RealmContext realmContext,
       SecurityContext securityContext) {
-    return Response.status(Response.Status.NO_CONTENT).build();
+
+    Namespace ns = decodeNamespace(namespace);
+    TableIdentifier tableIdentifier = TableIdentifier.of(ns, 
RESTUtil.decodeString(table));
+    return withCatalog(
+        securityContext,
+        prefix,
+        catalog -> {
+          catalog.reportMetric(prefix, tableIdentifier, reportMetricsRequest);

Review Comment:
   Why not call `metricsReporter.reportMetric()` from this class?



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

Reply via email to