Class PrometheusCollectorBuilder
- java.lang.Object
-
- io.opentelemetry.exporter.prometheus.PrometheusCollectorBuilder
-
public class PrometheusCollectorBuilder extends Object
Builder forPrometheusCollector.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrometheusCollectorbuild()Constructs a new instance of theCollectorbased on the builder's values.PrometheusCollectorbuildAndRegister()Constructs a new instance of theCollectorbased on the builder's values and registers it to PrometheusCollectorRegistry.defaultRegistry.PrometheusCollectorBuildersetMetricProducer(io.opentelemetry.sdk.metrics.export.MetricProducer metricProducer)Sets the metric producer for the collector.
-
-
-
Method Detail
-
setMetricProducer
public PrometheusCollectorBuilder setMetricProducer(io.opentelemetry.sdk.metrics.export.MetricProducer metricProducer)
Sets the metric producer for the collector. Required.- Parameters:
metricProducer- theMetricProducerto use.- Returns:
- this builder's instance.
-
build
public PrometheusCollector build()
Constructs a new instance of theCollectorbased on the builder's values.- Returns:
- a new
Collectorbased on the builder's values.
-
buildAndRegister
public PrometheusCollector buildAndRegister()
Constructs a new instance of theCollectorbased on the builder's values and registers it to PrometheusCollectorRegistry.defaultRegistry.- Returns:
- a new
Collectorbased on the builder's values.
-
-