Class PrometheusHttpServerBuilder

java.lang.Object
io.opentelemetry.exporter.prometheus.PrometheusHttpServerBuilder

public final class PrometheusHttpServerBuilder extends Object
A builder for PrometheusHttpServer.
  • Method Details

    • setHost

      public PrometheusHttpServerBuilder setHost(String host)
      Sets the host to bind to. If unset, defaults to "0.0.0.0".
    • setPort

      public PrometheusHttpServerBuilder setPort(int port)
      Sets the port to bind to. If unset, defaults to 9464.
    • newMetricReaderFactory

      public io.opentelemetry.sdk.metrics.export.MetricReaderFactory newMetricReaderFactory()
      Returns a new MetricReaderFactory with the configuration of this builder which can be registered with a SdkMeterProvider.