Package io.prometheus.client
Class Histogram.Builder
- java.lang.Object
-
- io.prometheus.client.SimpleCollector.Builder<Histogram.Builder,Histogram>
-
- io.prometheus.client.Histogram.Builder
-
- Enclosing class:
- Histogram
public static class Histogram.Builder extends SimpleCollector.Builder<Histogram.Builder,Histogram>
-
-
Field Summary
Fields Modifier and Type Field Description private double[]
buckets
-
Fields inherited from class io.prometheus.client.SimpleCollector.Builder
dontInitializeNoLabelsChild, fullname, help, labelNames, name, namespace, subsystem
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Histogram.Builder
buckets(double... buckets)
Set the upper bounds of buckets for the histogram.Histogram
create()
Return the constructed collector.Histogram.Builder
exponentialBuckets(double start, double factor, int count)
Set the upper bounds of buckets for the histogram with an exponential sequence.Histogram.Builder
linearBuckets(double start, double width, int count)
Set the upper bounds of buckets for the histogram with a linear sequence.-
Methods inherited from class io.prometheus.client.SimpleCollector.Builder
help, labelNames, name, namespace, register, register, subsystem
-
-
-
-
Method Detail
-
create
public Histogram create()
Description copied from class:SimpleCollector.Builder
Return the constructed collector.Abstract due to generics limitations.
- Specified by:
create
in classSimpleCollector.Builder<Histogram.Builder,Histogram>
-
buckets
public Histogram.Builder buckets(double... buckets)
Set the upper bounds of buckets for the histogram.
-
linearBuckets
public Histogram.Builder linearBuckets(double start, double width, int count)
Set the upper bounds of buckets for the histogram with a linear sequence.
-
exponentialBuckets
public Histogram.Builder exponentialBuckets(double start, double factor, int count)
Set the upper bounds of buckets for the histogram with an exponential sequence.
-
-