Net::Prometheus::Registry - a collection of metrics collectors
This class, or instances of it, acts as a simple storage array for instances derived from Net::Prometheus::Metric, known as "collectors".
A single global collection is stored by the module, accessible via the class methods. Additional collections may be made with the constructor and then accessed by instance methods.
$registry = Net::Prometheus::Registry->new
Returns a new registry instance.
$collector = Net::Prometheus::Registry->register( $collector ) $collector = $registry->register( $collector )
Adds a new collector to the registry. The collector instance itself is returned, for convenience of chaining method calls on it.
Net::Prometheus::Registry->unregister( $collector ) $registry->unregister( $collector )
Removes a previously-registered collector.
@collectors = Net::Prometheus::Registry->collectors @collectors = $registry->collectors
Returns a list of the currently-registered collectors.
Paul Evans <firstname.lastname@example.org>