GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mail::Milter::Authentication::Metric(3) User Contributed Perl Documentation Mail::Milter::Authentication::Metric(3)

Mail::Milter::Authentication::Metric - Class for metrics generation

version 3.20241024

Handle metrics collection and production for prometheus

new()

my $object = Mail::Milter::Authentication::Metric->new();

Create a new Mail::Milter::Authentication::Metric object This object is used to store, modify, and report metrics.

set_handler($handler)

Set a reference to the current handler

handle_exception($exception)

If we have a handler, then pass any exception to that handlers exception handling

prom()

Return the prom object if available

set_versions( $server )

Setup version metrics

get_timeout()

Returns the current value of timeout for metrics operations.

clean_label($text)

Given a string, return a version of that string which is safe to use as a metrics label.

count($args)

Increment the metric for the given counter Called from the base handler, do not call directly. $server is the current handler object

 count_id - the name of the metric to act on
 labels - hashref of labels to apply
 server - the current server object
 count - number to increment by (defaults to 1)

set($args)

Set the metric for the given counter Called from the base handler, do not call directly. $server is the current handler object

 count_id - the name of the metric to act on
 labels - hashref of labels to apply
 server - the current server object
 count - number to increment by (defaults to 1)

send( $server )

Send metrics to the parent server process.

register_metrics( $hash )

Register a new set of metric types and help texts. Called from the parent process in the setup phase.

Expects a hashref of metric description, keyed on metric name.

re_register_metric()

Re-register currently registered metrics to ensure backend metadata is correct

parent_metric_update( $server )

Called in the parent process to periodically update some metrics

child_handler( $server )

Handle a metrics or http request in the child process.

dbgout( $key, $value, $priority )

Pass arguments along to the dbgout method of the handler if we have one or log via the Mail::Milter::Authentication object if we do not.

Marc Bradshaw <marc@marcbradshaw.net>

This software is copyright (c) 2020 by Marc Bradshaw.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2024-10-24 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.