manangupta111 opened a new pull request, #23331:
URL: https://github.com/apache/kafka/pull/23331

   ## Summary
   - Adds `quota-utilization` on the existing Produce, Fetch, and Request quota 
MBeans (no new sensor, ObjectName, or quota entity).
   - Value is `measured-rate / effective-quota * 100` using the cached 
`MetricConfig` bound used for enforcement. It is not capped at 100; unlimited, 
missing, and non-positive bounds return `NaN`.
   - ControllerMutation is excluded (token-bucket enforcement does not match 
this rate-utilization definition).
   - Measurement does not call `ClientQuotaCallback.quotaLimit()`.
   
   ## Test plan
   - Unit tests
   - jmx metrics
   
   ```
   $>domain kafka.server
   #domain is set to kafka.server
   $>bean kafka.server:type=Produce,client-id=mg-quota-load-test-client
   #bean is set to kafka.server:type=Produce,client-id=mg-quota-load-test-client
   $>info
   #mbean = kafka.server:type=Produce,client-id=mg-quota-load-test-client
   #class name = org.apache.kafka.common.metrics.JmxReporter$KafkaMbean
   # attributes
     %0   - byte-rate (double, r)
     %1   - quota-utilization (double, r)
     %2   - throttle-time (double, r)
   #there's no operations
   #there's no notifications
   $>get quota-utilization
   #mbean = kafka.server:type=Produce,client-id=mg-quota-load-test-client:
   quota-utilization = 21.582440162437226;
   ```
   
   [KIP-1373: Client Quota Utilization 
Metrics](https://cwiki.apache.org/confluence/spaces/KAFKA/pages/451971254/KIP-1373+Client+Quota+Utilization+Metrics)


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

Reply via email to