yifan-c commented on code in PR #95:
URL: https://github.com/apache/cassandra-sidecar/pull/95#discussion_r1473339872


##########
src/main/java/org/apache/cassandra/sidecar/server/MainModule.java:
##########
@@ -383,19 +387,25 @@ public CassandraVersionProvider 
cassandraVersionProvider(DnsResolver dnsResolver
 
     @Provides
     @Singleton
+    @Named("StreamRequestRateLimiter")
     public SidecarRateLimiter streamRequestRateLimiter(ServiceConfiguration 
config)
     {
-        return SidecarRateLimiter.create(config.throttleConfiguration()
-                                               
.rateLimitStreamRequestsPerSecond());
+        long permitsPerSecond = 
config.throttleConfiguration().rateLimitStreamRequestsPerSecond();
+        LOGGER.info("Configuring streamRequestRateLimiter with 
rateLimitStreamRequestsPerSecond={}",

Review Comment:
   nit
   
   ```suggestion
           LOGGER.info("Configuring streamRequestRateLimiter. 
rateLimitStreamRequestsPerSecond={}",
   ```



##########
src/main/java/org/apache/cassandra/sidecar/server/MainModule.java:
##########
@@ -383,19 +387,25 @@ public CassandraVersionProvider 
cassandraVersionProvider(DnsResolver dnsResolver
 
     @Provides
     @Singleton
+    @Named("StreamRequestRateLimiter")
     public SidecarRateLimiter streamRequestRateLimiter(ServiceConfiguration 
config)
     {
-        return SidecarRateLimiter.create(config.throttleConfiguration()
-                                               
.rateLimitStreamRequestsPerSecond());
+        long permitsPerSecond = 
config.throttleConfiguration().rateLimitStreamRequestsPerSecond();
+        LOGGER.info("Configuring streamRequestRateLimiter with 
rateLimitStreamRequestsPerSecond={}",
+                    permitsPerSecond);
+        return SidecarRateLimiter.create(permitsPerSecond);
     }
 
     @Provides
     @Singleton
     @Named("IngressFileRateLimiter")
     public SidecarRateLimiter ingressFileRateLimiter(ServiceConfiguration 
config)
     {
-        return SidecarRateLimiter.create(config.trafficShapingConfiguration()
-                                               
.inboundGlobalFileBandwidthBytesPerSecond());
+        long bytesPerSecond = config.trafficShapingConfiguration()
+                                    
.inboundGlobalFileBandwidthBytesPerSecond();
+        LOGGER.info("Configuring ingressFileRateLimiter with 
InboundGlobalFileBandwidth={}/s",

Review Comment:
   I think there is value to still log the raw value, i.e. byte/s. For 
instance, it is easier for analytics tool to extract the values with the same 
unit, instead of human readable formats. 
   
   I would suggest this
   
   ```suggestion
   LOGGER.info("Configuring ingressFileRateLimiter. 
inboundGlobalFileBandwidth={}/s rawInboundGlobalFileBandwidth={}/s",
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to