dog-statsd
dog-statsd copied to clipboard
Get the stream
Close #27.
Add a public method to get the StreamWriter object from the Client. This enables closing the socket:
$statsd = new \Graze\DogStatsD\Client();
$statsd->configure(
[
'host' => '127.0.0.1',
'port' => 8125,
'namespace' => 'some.namespace',
]
);
$statsd->gauge('someMetric', 1);
$stream = $statsd->getStream();
$stream->__destruct();
unset($statsd);