jadami-stripe commented on code in PR #9201: URL: https://github.com/apache/pinot/pull/9201#discussion_r1304549833
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeConsumptionRateManager.java: ########## @@ -126,14 +137,17 @@ public interface ConsumptionRateLimiter { static class RateLimiterImpl implements ConsumptionRateLimiter { private final double _rate; private final RateLimiter _rateLimiter; + private MetricEmitter _metricEmitter; - private RateLimiterImpl(double rate) { + private RateLimiterImpl(double rate, MetricEmitter metricEmitter) { _rate = rate; _rateLimiter = RateLimiter.create(rate); + _metricEmitter = metricEmitter; } @Override public void throttle(int numMsgs) { + _metricEmitter.emitMetric(numMsgs, _rate, Clock.systemUTC().instant()); Review Comment: @sajjad-moradi, what do you think about only emitting this metric when `InstanceHolder.INSTANCE._isThrottlingAllowed`? I notice this keeps rocketing >100% whenever servers are starting and haven't passed status checks and rate limiting is not yet enabled. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org