Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rstgroup/statsd-module
Statsd module for Zend Framework 2
https://github.com/rstgroup/statsd-module
Last synced: 27 days ago
JSON representation
Statsd module for Zend Framework 2
- Host: GitHub
- URL: https://github.com/rstgroup/statsd-module
- Owner: rstgroup
- Created: 2015-07-23T09:08:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T09:33:39.000Z (almost 7 years ago)
- Last Synced: 2024-09-17T16:46:35.508Z (3 months ago)
- Language: PHP
- Homepage: http://rst.com.pl/
- Size: 15.6 KB
- Stars: 4
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# rstgroup/statsd-module [![Build Status](https://travis-ci.org/rstgroup/statsd-module.svg?branch=master)](https://travis-ci.org/rstgroup/statsd-module)
Module is based on [domnikl/statsd-php](https://github.com/domnikl/statsd-php).
## Installation
Using composer:
```
composer require rstgroup/statsd-module
```## Configuration
In your Zend Framework application config add to module list
```php
return [
'modules' => [
'RstGroup\\StatsdModule',
],
];
```also in your autoload config based on enviroment add statsd client configuration
```php
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\Udp`
* `RstGroup\Statsd\Connection\Tcp` errors will not be suppressed in this mode
* `RstGroup\Statsd\Connection\Memory` in this mode sending is disabled, but messages are collected
* `RstGroup\Statsd\Connection\Blackhole` in this mode sending is disabled## Usage
Typical usage from ServiceManager
```php
$client = $serviceManager->get("RstGroup\Statsd\Client");
```