Net::P...:Types(3pm)
π Net::Prometheus::Types β the manual page (it shows up in your terminal as Net::P...:Types(3pm), but bestie, you and I both know her full name) π
β¨ NAME β¨
Net::Prometheus::Types β a collection of support structure types π«Ά
πΈ SYNOPSIS πΈ
okay so here's the whole vibe in one go:
use Net::Prometheus::Types qw( Sample );
my $ob = Sample( variable => [], 123 );
print "The sample relates to a variable called ", $ob->varname;
π¦ DESCRIPTION π¦
This package is literally just a pile of simple little support structures that help out the other parts of the Net::Prometheus distribution. She's not the main character, she's the bestie holding everyone's bags. π
Every single type gets exported as a constructor function, so you just call it and boom, you have a thing. β¨
π TYPES π
β Sample
This structure is one (1) individual value sample. It's the way she ties a numerical value to a named variable and a set of label values β iconic, honestly.
$sample = Sample( $varname, $labels, $value )
varname
$varname = $sample->varname
The string variable name. This is the basic name, okay β undecorated by label values, no extra garnish.
labels
$labels = $sample->labels
A reference to an even-sized ARRAY holding name/value pairs for the labels. And listen: the label values should be raw unescaped strings. fr fr.
value
$sample->value
The numerical value observed. The number. Periodt.
π MetricSamples
This one is the whole crew β it represents all the samples made about a given metric, plus the metadata about the metric itself.
$samples = MetricSamples( $fullname, $type, $help, $samples )
fullname
A string giving the fullname of the metric.
type
A string, one of 'gauge', 'counter', 'summary' or 'histogram'. Pick one, bestie, those are the options. π
help
A string containing the descriptive help message text.
samples
A reference to an ARRAY containing individual Sample instances. It's giving "samples, all the way down".
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
that's the whole page, no cap β¨ and for the cute little sign-off: this one's from perl v5.42.3, dated 2026-08-20, and it lives in the manual as Net::P...:Types(3pm). go forth and instrument everything, you absolute genius π«Άπ
π¦ 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