Provided by: libnet-prometheus-perl_0.07-1_all
"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.
Sample 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 $varname = $sample->varname The string variable name. This is the basic name, undecorated by label values. labels $labels = $sample->labels A reference to an even-sized ARRAY containing name/value pairs for the labels. Label values should be raw unescaped strings. value $sample->value The numerical value observed. MetricSamples This structure represents all the samples made about a given metric, including 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'. help A string containing the descriptive help message text. samples A reference to an ARRAY containing individual "Sample" instances.
Paul Evans <email@example.com>