THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Define a new interface Monitorable in package org.apache.kafka.common. The authorizer plugins can implement the interface and broker can pass the instance of Metrics to Authorizer. Other broker or client plugins could potentially implement the interface and get the broker's or client's Metrics instance to add additional metrics from sub-components. This KIP will focus on exposing Kafka Metrics in Authorizer only.
Code Block | ||||
---|---|---|---|---|
| ||||
package org.apache.kafka.common; import org.apache.kafka.common.metrics.Metrics; /** * Interface for plugins to get Metrics instance */ public interface Monitorable { /** * Get the instance of {@link Metrics}. */ default void monitor(Metrics metrics) { return; }; } |
...