Class Counter.Builder
java.lang.Object
io.prometheus.client.SimpleCollector.Builder<Counter.Builder, Counter>
io.prometheus.client.Counter.Builder
- Enclosing class:
Counter
-
Field Summary
FieldsFields inherited from class SimpleCollector.Builder
dontInitializeNoLabelsChild, fullname, help, labelNames, name, namespace, subsystem, unit -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Return the constructed collector.Allow this counter to load exemplars from aCounterExemplarSampler.withExemplarSampler(CounterExemplarSampler exemplarSampler) Enable exemplars and provide a customCounterExemplarSampler.Prevent this counter from loading exemplars from aCounterExemplarSampler.Methods inherited from class SimpleCollector.Builder
help, labelNames, name, namespace, register, register, subsystem, unit
-
Field Details
-
exemplarsEnabled
-
exemplarSampler
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
create
Description copied from class:SimpleCollector.BuilderReturn the constructed collector.Abstract due to generics limitations.
- Specified by:
createin classSimpleCollector.Builder<Counter.Builder, Counter>
-
withExemplarSampler
Enable exemplars and provide a customCounterExemplarSampler. -
withExemplars
Allow this counter to load exemplars from aCounterExemplarSampler.If a specific exemplar sampler is configured for this counter that exemplar sampler is used (see
withExemplarSampler(CounterExemplarSampler)). Otherwise the default fromExemplarConfigis used. -
withoutExemplars
Prevent this counter from loading exemplars from aCounterExemplarSampler.You can still provide exemplars for explicitly individual observations, e.g. using
Counter.incWithExemplar(double, String...).
-