@Override
    public void run(final String... args) {
        if (this.isStarted.compareAndSet(false, true)) {
            metricsService = ExtensionLoader.getExtensionLoader(MetricsService.class).getJoin(config.getName());
            Preconditions.checkNotNull(metricsService,
                    "Can not find metrics service with metrics name : %s in metrics configuration.", config.getName());
            MetricsRegister metricsRegister = ExtensionLoader.getExtensionLoader(MetricsRegister.class).getJoin(config.getName());
            Preconditions.checkNotNull(metricsRegister,
                    "Can not find metrics register with metrics name : %s in metrics configuration.", config.getName());
            MetricsReporter.register(metricsRegister);
            metricsService.start(config, metricsRegister);
        } else {
            LOG.info("metrics service has started!");
        }
    }
Instantiates a new Metrics runner.

@param config the config
shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-metrics/src/main/java/org/apache/shenyu/springboot/starter/plugin/metrics/boot/MetricsRunner.java