Class MetricSnapshots
java.lang.Object
io.prometheus.metrics.model.snapshots.MetricSnapshots
- All Implemented Interfaces:
Iterable<MetricSnapshot>
Immutable list of metric snapshots.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMetricSnapshots(MetricSnapshot... snapshots) MetricSnapshots(Collection<MetricSnapshot> snapshots) To create MetricSnapshots, you can either call the constructor directly or usebuilder(). -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricSnapshots.Builderbuilder()get(int i) iterator()static MetricSnapshotsof(MetricSnapshot... snapshots) intsize()stream()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
snapshots
-
-
Constructor Details
-
MetricSnapshots
-
MetricSnapshots
To create MetricSnapshots, you can either call the constructor directly or usebuilder().- Parameters:
snapshots- the constructor creates a sorted copy of snapshots.- Throws:
IllegalArgumentException- if snapshots contain conflicting metric types (same name but different metric types like Counter vs Gauge), or if two HistogramSnapshots share a name but differ in gauge histogram vs classic histogram.
-
-
Method Details
-
of
-
iterator
- Specified by:
iteratorin interfaceIterable<MetricSnapshot>
-
size
public int size() -
get
-
stream
-
builder
-