Net::Prometheus::Types(3pm)

Net::Prometheus::Types3pm

A collection of support structure types

Usage

   use Net::Prometheus::Types qw( Sample );
   my $ob = Sample( variable => [], 123 );
   print "The sample relates to a variable called ", $ob->varname;

Overview

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.

Types

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.

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

Paul Evans <[email protected]>

From libnet-prometheus-perl 0.14-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.