Class HistogramSnapshot
java.lang.Object
io.prometheus.metrics.model.snapshots.MetricSnapshot
io.prometheus.metrics.model.snapshots.HistogramSnapshot
Immutable snapshot of a Histogram.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate final booleanFields inherited from class io.prometheus.metrics.model.snapshots.MetricSnapshot
dataPoints -
Constructor Summary
ConstructorsModifierConstructorDescriptionHistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramSnapshot.HistogramDataPointSnapshot> data) Use this with the first parametertrueto create a snapshot of a Gauge Histogram.privateHistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramSnapshot.HistogramDataPointSnapshot> data, boolean internal) HistogramSnapshot(MetricMetadata metadata, Collection<HistogramSnapshot.HistogramDataPointSnapshot> data) To create a newHistogramSnapshot, you can either call the constructor directly or use the builder withbuilder(). -
Method Summary
Modifier and TypeMethodDescriptionstatic HistogramSnapshot.Builderbuilder()(package private) MetricSnapshotescape(EscapingScheme escapingScheme, List<? extends DataPointSnapshot> dataPointSnapshots) booleanMethods inherited from class io.prometheus.metrics.model.snapshots.MetricSnapshot
getMetadata
-
Field Details
-
gaugeHistogram
private final boolean gaugeHistogram -
CLASSIC_HISTOGRAM
public static final int CLASSIC_HISTOGRAM- See Also:
-
-
Constructor Details
-
HistogramSnapshot
public HistogramSnapshot(MetricMetadata metadata, Collection<HistogramSnapshot.HistogramDataPointSnapshot> data) To create a newHistogramSnapshot, you can either call the constructor directly or use the builder withbuilder().- Parameters:
metadata- seeMetricMetadatafor naming conventions.data- the constructor will create a sorted copy of the collection.
-
HistogramSnapshot
public HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramSnapshot.HistogramDataPointSnapshot> data) Use this with the first parametertrueto create a snapshot of a Gauge Histogram. The data model for Gauge Histograms is the same as for regular histograms, except that bucket values are semantically gauges and not counters. See openmetrics.io for more info on Gauge Histograms. -
HistogramSnapshot
private HistogramSnapshot(boolean isGaugeHistogram, MetricMetadata metadata, Collection<HistogramSnapshot.HistogramDataPointSnapshot> data, boolean internal)
-
-
Method Details
-
isGaugeHistogram
public boolean isGaugeHistogram() -
getDataPoints
- Specified by:
getDataPointsin classMetricSnapshot
-
escape
MetricSnapshot escape(EscapingScheme escapingScheme, List<? extends DataPointSnapshot> dataPointSnapshots) - Specified by:
escapein classMetricSnapshot
-
builder
-