Mail::Milter::Authentication::Metric - Class for metrics generation
version 3.20210113
Handle metrics collection and production for prometheus
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 a reference to the current handler
If we have a handler, then pass any exception to that handlers exception handling
Return the prom object if available
Setup version metrics
Returns the current value of timeout for metrics operations.
Given a string, return a version of that string which is safe to use as a metrics label.
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 the metric for the given counter Called from the base handler, do not call directly. $server is the current handler object
Send metrics to the parent server process.
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 currently registered metrics to ensure backend metadata is correct
Called in the parent process to periodically update some metrics
Handle a metrics or http request in the child process.
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.
To install Mail::Milter::Authentication, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Milter::Authentication
CPAN shell
perl -MCPAN -e shell install Mail::Milter::Authentication
For more information on module installation, please visit the detailed CPAN module installation guide.