@Override
  public CompletableFuture<?> start() {
    LOG.info(
        "Starting metrics push gateway service pushing to {}:{}",
        config.getPushHost(),
        config.getPushPort());

    pushGateway =
        PushGateway.builder()
            .registry(metricsSystem.getRegistry())
            .address(config.getPushHost() + ":" + config.getPushPort())
            .job(config.getPrometheusJob())
            .build();

    // Create the executor
    scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
    scheduledExecutorService.scheduleAtFixedRate(
        this::pushMetrics,
        config.getPushInterval() / 2,
        config.getPushInterval(),
        TimeUnit.SECONDS);
    return CompletableFuture.completedFuture(null);
  }
Instantiates a new Metrics push gateway service.

@param configuration the configuration
@param metricsSystem the metrics system
metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/MetricsPushGatewayService.java