Skip to content

Commit b0e2cd7

Browse files
Fixed production readiness tests
1 parent 1f17793 commit b0e2cd7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,16 @@ public void warnOnFailedChecks(
116116

117117
@Produces
118118
public ProductionReadinessCheck checkMetricTags(MetricsConfiguration config) {
119-
if (config.userPrincipalTag().enableInApiMetrics()) {
119+
if (config.userPrincipalTag().enableInApiMetrics()
120+
&& config.realmIdTag().enableInApiMetrics()) {
120121
return ProductionReadinessCheck.of(
121122
Error.of(
122-
"Metrics configuration includes user principal name in tags.",
123+
"Metrics configuration includes both user principal name and realm id in tags this could cause performance implications.",
123124
"polaris.metrics.user-principal-tag.enable-in-api-metrics"));
125+
} else {
126+
LOGGER.warn(
127+
"Metrics configuration includes user principal name in tags. "
128+
+ "This could have performance implications.");
124129
}
125130
return ProductionReadinessCheck.OK;
126131
}

0 commit comments

Comments
 (0)