Class CounterSnapshot
java.lang.Object
io.prometheus.metrics.model.snapshots.MetricSnapshot
io.prometheus.metrics.model.snapshots.CounterSnapshot
Immutable snapshot of a Counter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields inherited from class io.prometheus.metrics.model.snapshots.MetricSnapshot
dataPoints -
Constructor Summary
ConstructorsModifierConstructorDescriptionCounterSnapshot(MetricMetadata metadata, Collection<CounterSnapshot.CounterDataPointSnapshot> dataPoints) To create a newCounterSnapshot, you can either call the constructor directly or use the builder withbuilder().privateCounterSnapshot(MetricMetadata metadata, Collection<CounterSnapshot.CounterDataPointSnapshot> dataPoints, boolean internal) -
Method Summary
Modifier and TypeMethodDescriptionstatic CounterSnapshot.Builderbuilder()(package private) MetricSnapshotescape(EscapingScheme escapingScheme, List<? extends DataPointSnapshot> dataPointSnapshots) Methods inherited from class io.prometheus.metrics.model.snapshots.MetricSnapshot
getMetadata
-
Constructor Details
-
CounterSnapshot
public CounterSnapshot(MetricMetadata metadata, Collection<CounterSnapshot.CounterDataPointSnapshot> dataPoints) To create a newCounterSnapshot, you can either call the constructor directly or use the builder withbuilder().- Parameters:
metadata- the metric name in metadata must not include the_totalsuffix. SeeMetricMetadatafor more naming conventions.dataPoints- the constructor will create a sorted copy of the collection.
-
CounterSnapshot
private CounterSnapshot(MetricMetadata metadata, Collection<CounterSnapshot.CounterDataPointSnapshot> dataPoints, boolean internal)
-
-
Method Details
-
getDataPoints
- Specified by:
getDataPointsin classMetricSnapshot
-
escape
MetricSnapshot escape(EscapingScheme escapingScheme, List<? extends DataPointSnapshot> dataPointSnapshots) - Specified by:
escapein classMetricSnapshot
-
builder
-