@Override
  public CompletableFuture<?> stop() {
    metricsSystem.shutdown();
    if (httpServer == null) {
      return CompletableFuture.completedFuture(null);
    }

    try {
      httpServer.stop();
      return CompletableFuture.completedFuture(null);
    } catch (final Throwable e) {
      return CompletableFuture.failedFuture(e);
    }
  }
Instantiates a new Metrics http service.

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