Starch::Plugin::Net::Statsd - Record store timing information to statsd.
my $starch = Starch->new(
plugins => ['::Net::Statsd'],
);
This plugin will record get, set, and remove store timings to statsd using Net::Statsd.
By default, for example, if you are using Starch::Store::Memory, stats like this will be recorded:
starch.Memory.set
starch.Memory.get-hit
starch.Memory.get-miss
starch.Memory.remove
starch.Memory.set-error
starch.Memory.get-error
starch.Memory.remove-error
Note that stats will not be collected for Starch::Store::Layered, as data about it isn't really useful as its just a proxy store.
Since this plugin detects exceptions and records the *-error
stats for
them you should, if you are using it, put the Starch::Plugin::LogStoreExceptions
plugin after this plugin in the plugins list. If you don't then exceptions
will be turned into log messages before this store gets to see them.
Setting this will cause the $Net::Statsd::HOST
variable to be
localized to it before the timing information is recorded.
Setting this will cause the $Net::Statsd::PORT
variable to be
localized to it before the timing information is recorded.
The path to store all of the Starch timing stats in, defaults to
starch
.
The sample rate to use, defaults to 1
. See "ABOUT SAMPLING" in Net::Statsd.
The path prefix which will be appended to the "statsd_root_path". Defaults to "short_store_class_name" in Starch::Store, but normalized to be a valid graphite path.
This is the full path, statsd_root_path.statsd_path
. This can be
set to override "statsd_root_path" and "statsd_path".
Please submit bugs and feature requests to the Starch-Plugin-Net-Statsd GitHub issue tracker:
https://github.com/bluefeet/Starch-Plugin-Net-Statsd/issues
Aran Clary Deltac <bluefeet@gmail.com>
Thanks to ZipRecruiter for encouraging their employees to contribute back to the open source ecosystem. Without their dedication to quality software development this distribution would not exist.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.