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


##########
quarkus/service/src/main/java/org/apache/polaris/service/quarkus/metrics/QuarkusMetricsConfiguration.java:
##########
@@ -19,11 +19,50 @@
 package org.apache.polaris.service.quarkus.metrics;
 
 import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefault;
+import jakarta.validation.constraints.Min;
 import java.util.Map;
 
 @ConfigMapping(prefix = "polaris.metrics")
 public interface QuarkusMetricsConfiguration {
 
   /** Additional tags to include in the metrics. */
   Map<String, String> tags();
+
+  /** Configuration for the Realm ID metric tag. */
+  RealmIdTag realmIdTag();
+
+  interface RealmIdTag {
+
+    /**
+     * Whether to include the Realm ID tag in the API request metrics.
+     *
+     * <p>Beware that if the cardinality of this tag is too high, it can cause 
performance issues or
+     * even crash the server.
+     */
+    @WithDefault("false")
+    boolean apiMetricsEnabled();

Review Comment:
   nit: this reads a bit odd to me. It feels like all API metrics are disabled. 
How about `enabledInApiMetrics`?



-- 
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-unsubscr...@polaris.apache.org

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

Reply via email to