Net::Prometheus::Registry - a collection of metrics collectors
Net::Prometheus::Registry
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 <leonerd@leonerd.org.uk>
To install Net::Prometheus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Prometheus
CPAN shell
perl -MCPAN -e shell install Net::Prometheus
For more information on module installation, please visit the detailed CPAN module installation guide.