logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

"Net::Prometheus::Registry" - a collection of metrics collectors

Author

       Paul Evans <leonerd@leonerd.org.uk>

perl v5.40.0                                       2024-11-09                     Net::Prometheus::Registry(3pm)

Constructor

new
          $registry = Net::Prometheus::Registry->new;

       Returns a new registry instance.

Description

       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.

Methods

register
          $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.

   unregister
          Net::Prometheus::Registry->unregister( $collector );
          $registry->unregister( $collector );

       Removes a previously-registered collector.

   collectors
          @collectors = Net::Prometheus::Registry->collectors;
          @collectors = $registry->collectors;

       Returns a list of the currently-registered collectors.

Name

       "Net::Prometheus::Registry" - a collection of metrics collectors

See Also