Net::Prometheus::Types - a collection of support structure types
use Net::Prometheus::Types qw( Sample ); my $ob = Sample( variable => , 123 ); print "The sample relates to a variable called ", $ob->varname;
This package contains some simple support structures that assist with other parts of the Net::Prometheus distribution.
Each type is exported as a constructor function.
This structure represents an individual value sample; associating a numerical value with a named variable and set of label values.
$sample = Sample( $varname, $labels, $value )
$varname = $sample->varname
The string variable name. This is the basic name, undecorated by label values.
$labels = $sample->labels
A reference to an even-sized ARRAY containing name/value pairs for the labels. Label values should be raw unescaped strings.
The numerical value observed.
This structure represents all the samples made about a given metric, including metadata about the metric itself.
$samples = MetricSamples( $fullname, $type, $help, $samples )
A string giving the fullname of the metric.
A string, one of
A string containing the descriptive help message text.
A reference to an ARRAY containing individual "Sample" instances.
Paul Evans <email@example.com>