public ConnectMetricsRegistry registry() {
        return registry;
    }
Get the registry of metric names.

@return the registry for the Connect metrics; never null
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/ConnectMetrics.java