singhpk234 commented on code in PR #2887:
URL: https://github.com/apache/polaris/pull/2887#discussion_r2464392287
##########
runtime/service/src/main/java/org/apache/polaris/service/reporting/DefaultMetricsReporter.java:
##########
@@ -0,0 +1,19 @@
+package org.apache.polaris.service.reporting;
+
+import io.smallrye.common.annotation.Identifier;
+import jakarta.enterprise.context.RequestScoped;
+import org.apache.iceberg.rest.requests.ReportMetricsRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@RequestScoped
+@Identifier("default")
+public class DefaultMetricsReporter implements MetricsReporter {
+ private static final Logger LOGGER =
LoggerFactory.getLogger(DefaultMetricsReporter.class);
+
+ @Override
+ public void reportMetric(
+ String prefix, String namespace, String table, ReportMetricsRequest
reportMetricsRequest) {
+ // Do Nothing
Review Comment:
My recommendation was to store them in persistence, so that later we can
serve them later, I recommend the same to @pingtimeout
https://lists.apache.org/thread/koogjvb73hbl9ospmm7owsdx8oh67wk1
##########
runtime/service/src/main/java/org/apache/polaris/service/reporting/LoggingMetricsReporter.java:
##########
@@ -0,0 +1,22 @@
+package org.apache.polaris.service.reporting;
+
+import io.smallrye.common.annotation.Identifier;
+import jakarta.enterprise.context.RequestScoped;
+import org.apache.iceberg.rest.requests.ReportMetricsRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@RequestScoped
+@Identifier("logging")
+public class LoggingMetricsReporter implements MetricsReporter {
+ private static final Logger LOGGER =
LoggerFactory.getLogger(LoggingMetricsReporter.class);
+
+ @Override
+ public void reportMetric(
+ String prefix, String namespace, String table, ReportMetricsRequest
reportMetricsRequest) {
+ LOGGER.info(prefix);
Review Comment:
Agree, Also i would recommend adding table uuid in the logs
--
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]