21use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
22use Liuggio\StatsdClient\Entity\StatsdDataInterface;
50 $this->prefix = rtrim(
$prefix,
'.' );
58 return $this->prefix .
'.' . $key;
61 public function timing( $key, $time ) {
62 return $this->factory->timing( $this->
addPrefixToKey( $key ), $time );
65 public function gauge( $key, $value ) {
66 return $this->factory->gauge( $this->
addPrefixToKey( $key ), $value );
69 public function set( $key, $value ) {
70 return $this->factory->set( $this->
addPrefixToKey( $key ), $value );
82 return $this->factory->updateCount( $this->
addPrefixToKey( $key ), $delta );
88 $metric = StatsdDataInterface::STATSD_METRIC_COUNT
90 return $this->factory->produceStatsdData(
Proxy to prefix metric keys sent to a StatsdDataFactoryInterface.
StatsdDataFactoryInterface $factory
__construct(StatsdDataFactoryInterface $factory, $prefix)
updateCount( $key, $delta)
produceStatsdData( $key, $value=1, $metric=StatsdDataInterface::STATSD_METRIC_COUNT)