Metric...r::Tee(3pm)
π Metrics::Any::Adapter::Tee β the polyamorous adapter π
okay so bestie, this is a User Contributed Perl Documentation page for Metrics::Any::Adapter::Tee, and it is literally the adapter that says "why pick one when you can have all of them". no cap. let's get into it π
β¨ NAME β¨
Metrics::Any::Adapter::Tee β send metrics to multiple adapters π¦
like, multiple. at once. at the same time. iconic behaviour honestly.
πΈ SYNOPSIS πΈ
use Metrics::Any::Adapter 'Tee',
"Prometheus",
[ "File", path => "metrics.log" ],
"Statsd";
see how we're just listing them out? three adapters, one Tee, zero drama. the way that this just works π«Ά
π DESCRIPTION π
This Metrics::Any adapter type acts as a container for multiple other adapters, allowing an application to report its metrics via multiple different mechanisms at the same time.
fr fr. it's giving group chat energy β every metric gets sent to everyone. no one gets left on read π¬β¨
π ARGUMENTS π
Each value passed in the import list should either be an adapter type string or an array reference containing the name and additional arguments.
so like, two flavours, pick your fighter:
- a string β just the adapter type name, plain and simple π«
- an array reference β
[ name, additional, arguments ], when you've got more to say π¬
Adapters specified by string are split in the same way as Metrics::Any::Adapter splits the METRICS_ANY_ADAPTER environment variable; namely by parsing optional arguments after a colon, separated by commas or equals signs. E.g.
"File:path=metrics.log"
would be equivalent to the version given in the synopsis above.
lowkey obsessed with how a colon and some equals signs can carry the whole vibe of an array ref. the string form is a shortcut, not a different thing β same destination, cuter route π§
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
the actual main character. we stan π
and that's the whole page bestie, no filler, every detail preserved, we ate and left no crumbs π
signing off with the receipts: this was perl v5.36.0, dated 2023-09-29, and yes the doc header really does abbreviate the title to Metric...r::Tee(3pm) like that, we don't make the rules ππ
go forth and tee your metrics, queen πβ¨
π¦ where this page comes from
- debian trixie: libmetrics-any-perl 0.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmetrics-any-perl 0.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmetrics-any-perl 0.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmetrics-any-perl 0.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms