KafkaMetrics isn't a public API currently. Are we willing to make it one? I think this is a very big change, if so.
This affects a huge number of classes. MetricConfig, MetricReporter, MetricName, Sensor, KafkaMetric, and probably more I'm forgetting would need to become public APIs that we support indefinitely. So at the very least, the KIP needs to propose adding an interface annotation to those classes of Stable or Evolving. Also-- a minor point compared to the previous one-- but there is no need for single-function "add-on-API" interfaces like Monitorable any more. This was something we used to do back before Java 8 was supported. In the Java 7 days we couldn't really add a function to an existing interface so we had stuff like this and a lot of instanceof checks. That's not needed any more. You can just add the function to the Authorizer interface directly. Or better yet, just add this field to AuthorizerServerInfo. The purpose of AuthorizerServerInfo was to make new fields like this easy to add. best, Colin On Fri, May 15, 2020, at 14:21, Zhiguo Huang wrote: > Thanks to everyone for their input. I've incorporated the changes, and I > think this is ready for voting. > > To summarize, the KIP simply proposes to add a feature which expose > instance of Kafka Metrics in Kafka Authorizer plugin.The KIP can be > found > here: > https://cwiki.apache.org/confluence/display/KAFKA/KIP-608+-+Expose+Kafka+Metrics+in+Authorizer > > Thanks a lot! > > Jeff. >