Class SimpleCollector.Builder<B extends SimpleCollector.Builder<B,C> , C extends SimpleCollector>
java.lang.Object
io.prometheus.client.SimpleCollector.Builder<B,C>
- Direct Known Subclasses:
Counter.Builder, Enumeration.Builder, Gauge.Builder, Histogram.Builder, Info.Builder, Summary.Builder
- Enclosing class:
SimpleCollector<Child>
public abstract static class SimpleCollector.Builder<B extends SimpleCollector.Builder<B,C>, C extends SimpleCollector>
extends Object
Builders let you configure and then create collectors.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Ccreate()Return the constructed collector.Set the help string of the metric.labelNames(String... labelNames) Set the labelNames of the metric.Set the name of the metric.Set the namespace of the metric.register()Create and register the Collector with the default registry.register(CollectorRegistry registry) Create and register the Collector with the given registry.Set the subsystem of the metric.Set the unit of the metric.
-
Field Details
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
-
subsystem
-
namespace
-
unit
-
help
-
labelNames
-
create
Return the constructed collector.Abstract due to generics limitations.
-
register
Create and register the Collector with the default registry. -
register
Create and register the Collector with the given registry.
-