PHP code example of rstgroup / statsd-module

1. Go to this page and download the library: Download rstgroup/statsd-module library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rstgroup / statsd-module example snippets


return [
    'modules' => [
        'RstGroup\\StatsdModule',
    ],
];

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',
    ],
];

$client = $serviceManager->get("RstGroup\Statsd\Client");