private void validateConfig(final MetricsConfiguration config) {
    checkArgument(config.getPort() >= 0 && config.getPort() < 65535, "Invalid port configuration.");
    checkArgument(config.getHost() != null, "Required host is not configured.");
    checkArgument(
        !(config.isEnabled() && config.isPushEnabled()),
        "Metrics Http Service cannot run concurrent with push metrics.");
  }
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