Interface MultiCollector
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Like
Collector, but collecting multiple Snapshots at once.-
Method Summary
Modifier and TypeMethodDescriptioncollect()Called when the Prometheus server scrapes metrics.default MetricSnapshotsOverride this and return an empty list if the MultiCollector does not return a constant list of names (names may be added / removed between scrapes).
-
Method Details
-
collect
Called when the Prometheus server scrapes metrics. -
collect
Likecollect(), but returns only the snapshots whereincludedNames.test(name)istrue.Override this if there is a more efficient way than first collecting all snapshot and then discarding the excluded ones.
-
getPrometheusNames
Override this and return an empty list if the MultiCollector does not return a constant list of names (names may be added / removed between scrapes).
-