rstgroup / statsd-module
Statsd module for ZF2/ZF3
Installs: 70 456
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 2
Open Issues: 0
pkg:composer/rstgroup/statsd-module
Requires
- php: >=5.6
- domnikl/statsd: ^2.1
- zendframework/zend-modulemanager: ^2.4
- zendframework/zend-servicemanager: ^2.6 || ^3
Requires (Dev)
- phpunit/phpunit: ^5.6.25 || ^6.5.5
This package is not auto-updated.
Last update: 2025-10-26 01:16:10 UTC
README
Module is based on domnikl/statsd-php.
Installation
Using composer:
composer require rstgroup/statsd-module
Configuration
In your Zend Framework application config add to module list
return [ 'modules' => [ 'RstGroup\\StatsdModule', ], ];
also in your autoload config based on enviroment add statsd client configuration
return [ 'statsd' => [ 'tcp' => [ 'host' => 'example_host', 'port' => example_port, 'timeout' => null, 'persistent' => false, 'mtu' => 1500, ], 'udp' => [ 'host' => 'example_host', 'port' => example_port, 'timeout' => null, 'persistent' => false, 'mtu' => 1500, ], 'namespace' => 'services.default', 'connectionType' => 'RstGroup\Statsd\Connection\Blackhole', ], ];
Connection types:
RstGroup\Statsd\Connection\UdpRstGroup\Statsd\Connection\Tcperrors will not be suppressed in this modeRstGroup\Statsd\Connection\Memoryin this mode sending is disabled, but messages are collectedRstGroup\Statsd\Connection\Blackholein this mode sending is disabled
Usage
Typical usage from ServiceManager
$client = $serviceManager->get("RstGroup\Statsd\Client");