Constructor, that accepts an array of stat collection callbacks.
An alias for the type of delegates that are called for stat collection
Appends a stat collector callback to the list of existing ones. May result in a re-allocation of the entire buffer storing the callbacks.
Collects stats by calling all delegates specified for stat collection, formats them using ocean.util.prometheus.collector.StatFormatter eventually, and finally returns the accumulated result. The specifications of the format can be found at https://prometheus.io/docs/instrumenting/exposition_formats/.
This class provides methods to collect metrics with no label, one label, or multiple labels, using overloaded definitions of the collect method.
Once the desired stats have been collected, the accumulated response string can be collected using the getCollection method.
Additionally, the reset method can be used to reset stat collection, when the desired stats have been collected from a Collector instance.