Bug#1036965: ITP: libplack-middleware-prometheus-requesttimes-perl -- Perl module that records response times with a prometheus histogram

[email protected]
Newsgroups gmane.linux.debian.devel.perl
Message-ID <ZHa6LIzcp7G7i8pa__22725.9415014245$1685502757$gmane$org@deb12>
Package: wnpp
Owner: Mason James <[email protected]>
Severity: wishlist
X-Debbugs-CC: [email protected], [email protected]

* Package name    : libplack-middleware-prometheus-requesttimes-perl
  Version         : 0.0001
  Upstream Author : Colin Newell <[email protected]>
* URL             : https://metacpan.org/release/Plack-Middleware-Prometheus-RequestTimes
* License         : Artistic or GPL-1+
  Programming Lang: Perl
  Description     : Perl module that records response times with a prometheus histogram

To setup a prometheus metrics app in your PSGI application, hook this
Plack::Middleware::Prometheus::RequestTimes middleware up with a histogram and
the metrics can report on your response times.

use strict;

use warnings;

use My::Website;

use Net::Prometheus;

use Net::Prometheus::ProcessCollector;

my $client = Net::Prometheus->new;

$client->register( Net::Prometheus::ProcessCollector->new(

prefix => "parent_process",

pid => getppid(),

) );

my $response_times = $client->new_histogram(

name => "response_times",

help => "Application response times",

);


--
Generated with the help of dpt-gen-itp(1) from pkg-perl-tools.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.