public static void register(final MetricsRegister metricsRegister) {
        MetricsReporter.metricsRegister = metricsRegister;
        MetricsReporter.registerCounter(LabelNames.REQUEST_TOTAL, "shenyu request total count");
        MetricsReporter.registerCounter(LabelNames.REQUEST_TYPE_TOTAL, new String[]{"path", "type"}, "shenyu http request type total count");
        MetricsReporter.registerCounter(LabelNames.REQUEST_THROW_TOTAL, "shenyu request error total count");
        MetricsReporter.registerHistogram(LabelNames.EXECUTE_LATENCY_NAME, "the shenyu executor latency millis");
        MetricsReporter.registerCounter(LabelNames.SENTINEL_REQUEST_RESTRICT_TOTAL, "shenyu sentinel request restrict total count");
        MetricsReporter.registerCounter(LabelNames.SENTINEL_REQUEST_CIRCUITBREAKER_TOTAL, "shenyu sentinel circuitbreaker request total count");
        MetricsReporter.registerCounter(LabelNames.RESILIENCE4J_REQUEST_RESTRICT_TOTAL, "shenyu resilience4j request restrict total count");
        MetricsReporter.registerCounter(LabelNames.RESILIENCE4J_REQUEST_CIRCUITBREAKER_TOTAL, "shenyu resilience4j circuitbreaker request total count");
        MetricsReporter.registerCounter(LabelNames.HYSTRIX_REQUEST_CIRCUITBREAKER_TOTAL, "shenyu hystrix circuitbreaker request total count");
        MetricsReporter.registerCounter(LabelNames.RATELIMITER_REQUEST_RESTRICT_TOTAL, "shenyu ratelimiter request restrict total count");
    }
@Test
    public void testRegister() throws Exception {
        Map<String, Counter> map1 = getPrivateField(metricsRegister, "COUNTER_MAP", Map.class);
        Assertions.assertEquals(map1.size(), 9);
        Map<String, Histogram> map2 = getPrivateField(metricsRegister, "HISTOGRAM_MAP", Map.class);
        Assertions.assertEquals(map2.size(), 3);
        List<String> labels = new ArrayList<>();
        labels.add("shenyu_request_total");
        Collection<Metric> metrics = new ArrayList<>();
        metrics.add(new Metric(MetricType.COUNTER, "name1", DOCUMENT, labels));
        metrics.add(new Metric(MetricType.GAUGE, "name2", DOCUMENT, labels));
        metrics.add(new Metric(MetricType.HISTOGRAM, "name3", DOCUMENT, labels));
        MetricsReporter.registerMetrics(metrics);
        Map<String, Counter> map3 = getPrivateField(metricsRegister, "COUNTER_MAP", Map.class);
        Assertions.assertEquals(map3.size(), 10);
        Map<String, Histogram> map4 = getPrivateField(metricsRegister, "HISTOGRAM_MAP", Map.class);
        Assertions.assertEquals(map4.size(), 4);
        Map<String, Gauge> map5 = getPrivateField(metricsRegister, "GAUGE_MAP", Map.class);
        Assertions.assertEquals(map5.size(), 3);
    }