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

   *<b>Note: I checked the old versions and do not find this metric was ever 
working hence we might consider of removing this metric if it's not worth.</b>*
   
   Kafka Consumer client registers node/connection latency metrics in 
[Selector.java](https://github.com/apache/kafka/blob/9d634629f29cd402a723d7e7bece18c8099065a4/clients/src/main/java/org/apache/kafka/common/network/Selector.java#L1359)
 but the values against the metric is never recorded. This seems to be an issue 
since inception. However, the same metric is also created for Kafka Producer 
but the value is recorded for Kafka Producer in 
[Sender.java](https://github.com/apache/kafka/blob/9d634629f29cd402a723d7e7bece18c8099065a4/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java#L1092).
 Hence node - request-latency-max and request-latency-avg appears correctly for 
Kafka Producer but is NaN for Kafka Consumer.
   
   Though it's not clear which request latency this metric should hold i.e. all 
requests originating for consumer or any specific. The PR adds `fetch latency` 
as `node` `request-latency`. As the Kafka Producer also has several outgoing 
requests from client but records `produce latency` as  `node` `request-latency` 
hence similar concept is applied for consumer, which captures `fetch latency` 
as `node` `request-latency`.
   
   Please let me know the feedback and what best this metric should hold.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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