Net::P...egistry(3pm)
β¨ NAME β¨
Net::Prometheus::Registry β a little collection of metrics collectors π (this is the Net::P...egistry(3pm) page bestie, yes the title is doing the most)
πΈ DESCRIPTION πΈ
Okay so picture this: this class β or, like, instances of it β is basically a cute lil storage array π¦ but make it metrics. It holds things derived from Net::Prometheus::Metric, and we call those lil guys "collectors".
There's one single global collection that the module keeps for you, and you reach it through the class methods. Want more than one? No problem bestie, make extra collections with the constructor and then grab them with the instance methods. Multiple registries, one iconic vibe π
π CONSTRUCTOR π
β¨ new β¨
$registry = Net::Prometheus::Registry->new;
Returns a brand new registry instance. Fresh out the box, zero notes, main character energy π
π METHODS π
π¦ register π¦
$collector = Net::Prometheus::Registry->register( $collector );
$collector = $registry->register( $collector );
Adds a new collector to the registry. And the glow-up? It hands you back the collector instance itself, so you can chain method calls on it like it's nothing. Convenience slay β¨
π unregister π
Net::Prometheus::Registry->unregister( $collector );
$registry->unregister( $collector );
Removes a collector you'd previously registered. It's giving "we don't know her anymore" π no cap.
π collectors π
@collectors = Net::Prometheus::Registry->collectors;
@collectors = $registry->collectors;
Returns a list of all the collectors that are registered right now. The whole roster, the full lineup, the group chat members list π«Ά
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk> β the actual icon who made this, we stan π
and that's the whole page bestie, no notes π
this was written up as User Contributed Perl Documentation, running on perl v5.42.3, dated 2026-08-20 β so go forth, register your collectors, and remember: the registry is just the vibes holding it all together πΈβ¨
π¦ where this page comes from
- ubuntu stonking: libnet-prometheus-perl 0.16-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms