public static class PrometheusCollector.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
PrometheusCollector |
build()
Constructs a new instance of the
Collector based on the builder's values. |
PrometheusCollector |
buildAndRegister()
Constructs a new instance of the
Collector based on the builder's values and
registers it to Prometheus CollectorRegistry.defaultRegistry. |
PrometheusCollector.Builder |
setMetricProducer(io.opentelemetry.sdk.metrics.export.MetricProducer metricProducer)
Sets the metric producer for the collector.
|
public PrometheusCollector.Builder setMetricProducer(io.opentelemetry.sdk.metrics.export.MetricProducer metricProducer)
metricProducer - the MetricProducer to use.public PrometheusCollector build()
Collector based on the builder's values.Collector based on the builder's values.public PrometheusCollector buildAndRegister()
Collector based on the builder's values and
registers it to Prometheus CollectorRegistry.defaultRegistry.Collector based on the builder's values.