Hi Satish, Thank you for your feedback!
Please find my answers below. >> Did you consider taking version property by loading “kafka/kafka-version.properties” as a resource while java client is initialized? “kafka/kafka-version.properties” is shipped with kafka-clients jar. I wasn't aware of the property file. It is exactly what I need. Thanks for pointing that out! >> I assume this metric value will be the total no of clients connected to a broker irrespective of whether name and version follow the expected pattern ([-.\w]+) or not. That is correct. >> It seems client name and client version are treated as tags for `ConnectedClients` metric. If so, you may implement this metric similar to `BrokerTopicMetrics` with topic tag as mentioned here[1]. When is the metric removed for a specific client-name and client-version? That is correct. Client name and version are treated as tags like in BrokerTopicMetrics. My plan is to remove the metric when it goes back to zero - when all clients with a given name & version are disconnected. Best, David On Wed, Aug 21, 2019 at 6:52 PM Satish Duggana <satish.dugg...@gmail.com> wrote: > Hi David, > Thanks for the KIP. I have a couple of questions. > > >> For the Java client, the idea is to define two constants in the code to > store its name and its version. If possible, the version will be set > automatically based on metadata coming from gradle (or the repo itself) to > avoid having to do manual changes. > > Did you consider taking version property by loading > “kafka/kafka-version.properties” as a resource while java client is > initialized? “kafka/kafka-version.properties” is shipped with > kafka-clients jar. > > >> kafka.server:type=ClientMetrics,name=ConnectedClients > I assume this metric value will be the total no of clients connected > to a broker irrespective of whether name and version follow the > expected pattern ([-.\w]+) or not. > > >> > kafka.server:type=ClientMetrics,name=ConnectedClients,clientname=([-.\w]+),clientversion=([-.\w]+) > It seems client name and client version are treated as tags for > `ConnectedClients` metric. If so, you may implement this metric > similar to `BrokerTopicMetrics` with topic tag as mentioned here[1]. > When is the metric removed for a specific client-name and > client-version? > > 1. > https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/KafkaRequestHandler.scala#L231 > > Thanks, > Satish. > > > > > On Wed, Aug 21, 2019 at 5:33 PM David Jacot <dja...@confluent.io> wrote: > > > > Hi all, > > > > I would like to start a discussion for KIP-511: > > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-511%3A+Collect+and+Expose+Client%27s+Name+and+Version+in+the+Brokers > > > > Let me know what you think. > > > > Best, > > David >