summaryrefslogtreecommitdiff
path: root/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClientInterface.php
blob: e2c75cda52d025012cbfac082ba6264d4d931a74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace Liuggio\StatsdClient;

use Liuggio\StatsdClient\Sender\SenderInterface;
use Liuggio\StatsdClient\Entity\StatsdDataInterface;
use Liuggio\StatsdClient\Exception\InvalidArgumentException;

Interface StatsdClientInterface
{
    const MAX_UDP_SIZE_STR = 512;

    /*
     * Send the metrics over UDP
     *
     * @abstract
     * @param array|string|StatsdDataInterface  $data message(s) to sent
     * @param int $sampleRate Tells StatsD that this counter is being sent sampled every Xth of the time.
     *
     * @return integer the data sent in bytes
     */
    function send($data, $sampleRate = 1);
}