=begin pod =NAME Template::Prometheus =AUTHOR Patrick Spek <p.spek@tyil.work> =VERSION 0.0.0 =head1 Description Objects to easily render templates of metrics for usage with Prometheus. =head1 Installation Install this module through L<zef|https://github.com/ugexe/zef>: =begin code :lang<sh> zef install Template::Prometheus =end code =head1 Example usage =head2 Exporting stats from the C<App::CPAN> database =begin code Template::Prometheus .new(:prefix<cpan6>) .add-metric(GaugeMetric.new( name => "distribution_count", value => ModuleRepo::count, description => "Number of distributions in the database", )) .add-metric(GaugeMetric.new( name => "module_count", value => ModuleRepo::count-unique, description => "Number of unique modules in the database", )) .add-metric(GaugeMetric.new( name => "pause_id_count", value => ModuleRepo::count-pause-ids, description => "Number of PAUSE IDs in the database", )) .Str .say =end code =head1 License This module is distributed under the terms of the AGPL-3.0. =end pod