@Override
    public void registerGauge(final String name, final String[] labelNames, final String document) {
        if (!GAUGE_MAP.containsKey(name)) {
            Gauge.Builder builder = Gauge.build().name(name).help(document);
            if (null != labelNames) {
                builder.labelNames(labelNames);
            }
            GAUGE_MAP.putIfAbsent(name, builder.register());
        }
    }
@Test
    public void testRegisterGauge() throws Exception {
        String name = "request_throw_total";
        String[] labelNames = new String[] {"name1", "name2"};
        prometheusMetricsRegister.registerGauge(name, labelNames, "shenyu request total count");
        Field field = prometheusMetricsRegister.getClass().getDeclaredField("GAUGE_MAP");
        field.setAccessible(true);
        Map<String, Gauge> map = (Map<String, Gauge>) field.get(prometheusMetricsRegister);
        Assertions.assertEquals(map.get(name).describe().toString(),
                "[Name: request_throw_total Unit: Type: GAUGE Help: shenyu request total count Samples: []]");
        Gauge gauge = map.get(name);
        prometheusMetricsRegister.gaugeIncrement(name, labelNames);
        Assertions.assertEquals(gauge.labels(labelNames).get(), 1.0);
        prometheusMetricsRegister.gaugeDecrement(name, labelNames);
        Assertions.assertEquals(gauge.labels(labelNames).get(), 0.0);
        prometheusMetricsRegister.clean();
    }