public MetricRegistry getMetricRegistry() {
        return this.metrics;
    }
Retrieve the metrics registry, return null if is is disabled.

@return metrics registry
jraft-core/src/main/java/com/alipay/sofa/jraft/core/NodeMetrics.java