BedrockStreaming / Statsd

PHP component easing the statsd usage
13 stars 14 forks source link

Add ability to set prefix to stats names #21

Closed fracz closed 7 years ago

fracz commented 7 years ago

Usage:

use \M6Web\Component\Statsd;
$statsd = new Statsd\Client([...]);
$statsd->setPrefix('my.website.');
$statsd->increment('service.coucougraphite');
$statsd->send();

This results in updating the my.website.service.coucougraphite. It allows to avoid spreading the same prefix across the whole application.

Oliboy50 commented 7 years ago

LGTM

KuiKui commented 7 years ago

Is it possible to add tests ?

omansour commented 7 years ago

for me this feature should be managed outside the component.