Interface ContainerMetricsConfig.Builder

  • Method Details

    • metricsEndpoints

      ContainerMetricsConfig.Builder metricsEndpoints(Collection<MetricsEndpoint> metricsEndpoints)

      A list of metrics endpoints to scrape from the container. Each endpoint specifies the path where the container exposes Prometheus-formatted metrics and the frequency at which to publish them. You can specify a maximum of 1 endpoint.

      Parameters:
      metricsEndpoints - A list of metrics endpoints to scrape from the container. Each endpoint specifies the path where the container exposes Prometheus-formatted metrics and the frequency at which to publish them. You can specify a maximum of 1 endpoint.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metricsEndpoints

      ContainerMetricsConfig.Builder metricsEndpoints(MetricsEndpoint... metricsEndpoints)

      A list of metrics endpoints to scrape from the container. Each endpoint specifies the path where the container exposes Prometheus-formatted metrics and the frequency at which to publish them. You can specify a maximum of 1 endpoint.

      Parameters:
      metricsEndpoints - A list of metrics endpoints to scrape from the container. Each endpoint specifies the path where the container exposes Prometheus-formatted metrics and the frequency at which to publish them. You can specify a maximum of 1 endpoint.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metricsEndpoints

      ContainerMetricsConfig.Builder metricsEndpoints(Consumer<MetricsEndpoint.Builder>... metricsEndpoints)

      A list of metrics endpoints to scrape from the container. Each endpoint specifies the path where the container exposes Prometheus-formatted metrics and the frequency at which to publish them. You can specify a maximum of 1 endpoint.

      This is a convenience method that creates an instance of the MetricsEndpoint.Builder avoiding the need to create one manually via MetricsEndpoint.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to metricsEndpoints(List<MetricsEndpoint>).

      Parameters:
      metricsEndpoints - a consumer that will call methods on MetricsEndpoint.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: