| 1 |
<?php |
| 2 |
|
| 3 |
namespace Liuggio\StatsdClient; |
| 4 |
|
| 5 |
use Liuggio\StatsdClient\Sender\SenderInterface; |
| 6 |
use Liuggio\StatsdClient\Entity\StatsdDataInterface; |
| 7 |
use Liuggio\StatsdClient\Exception\InvalidArgumentException; |
| 8 |
|
| 9 |
Interface StatsdClientInterface |
| 10 |
{ |
| 11 |
const MAX_UDP_SIZE_STR = 512; |
| 12 |
|
| 13 |
/* |
| 14 |
* Send the metrics over UDP |
| 15 |
* |
| 16 |
* @abstract |
| 17 |
* @param array|string|StatsdDataInterface $data message(s) to sent |
| 18 |
* @param int $sampleRate Tells StatsD that this counter is being sent sampled every Xth of the time. |
| 19 |
* |
| 20 |
* @return integer the data sent in bytes |
| 21 |
*/ |
| 22 |
function send($data, $sampleRate = 1); |
| 23 |
} |