Hi Viktor, Thanks for the feedback, 1. The min, max and avg variants are calculated automatically via the SampledStat abstraction <https://github.com/apache/kafka/blob/36c5ad4c6adcfb4cd3dee194f7cd835c364a3082/clients/src/main/java/org/apache/kafka/common/metrics/stats/SampledStat.java#L35> - example usage here <https://github.com/apache/kafka/blob/trunk/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceMetrics.java#L173-L177C11> . Since the metric is partition based, the min, max and avg variant are calculated over the value samples for a specific partition. 2. I've added a more verbose description into the KIP, please take a look.
Thank you! Elkhan On Wed, 30 Aug 2023 at 14:06, Viktor Somogyi-Vass <viktor.somo...@cloudera.com.invalid> wrote: > Hi Elkhan, > > I think this is quite a useful improvement. A few questions, suggestions: > 1. How do you calculate the min, max and avg variants? If I understand > correctly then the metric itself is partition based > (where replication-offset-lag is the lag of the replica that is being > consumed) and these are min, max, avg across replicas? > 2. You briefly mention replication-latency-ms at the end but I think it'd > be worth writing a bit more about it, what it does currently, how it is > calculated and therefore why it doesn't fit. > > Thanks, > Viktor > > On Sat, Aug 26, 2023 at 3:49 PM Elxan Eminov <elxanemino...@gmail.com> > wrote: > > > Relatively minor change with a new metric for MM2 > > > > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-971%3A+Expose+replication-offset-lag+MirrorMaker2+metric > > >