Hey Amrit, Could you elaborate on "this is not updated in producer metrics documentation in confluent"? The confluent documentation <https://docs.confluent.io/platform/current/kafka/monitoring.html#consumer-global-request-metrics>states, "The average request latency in ms", which seems right to me.
If you trace the code, the latency measures the time difference between the time the request was created and the response received. I believe it is between the time send() was called, and the time the producer receives the response from the broker. And as you might know, the producer doesn't immediately transmit the sends when send() is called, the requests can be batched depending on your configuration. Hope this helps, P On Sat, Nov 5, 2022 at 9:02 AM Amrit Gupta <guptamrit...@gmail.com> wrote: > Bumping this > > On Fri, 4 Nov 2022 at 3:26 PM, Amrit Gupta <guptamrit...@gmail.com> wrote: > > > Hi, > > > > There is a producer metric > > < > https://github.com/apache/kafka/blob/14c36c7539cf5a7a54c2c7e30e115b3f4c4a9402/clients/src/main/java/org/apache/kafka/clients/producer/internals/SenderMetricsRegistry.java#L92 > > > > ( request-latency-avg ), this is not updated in producer metrics > > documentation in confluent. > > > > Also can I please get the detail of this metric that records the time > > spent from which point to which point exactly? > > > > Does it include the time it resides in the producer buffer? or it is from > > the point it is removed from the producer buffer. > > > > I mean does this include the time from application calling send() and the > > record is sent to the broker? > > > > Thanks, > > Tushar > > > > >