factory = $factory; $this->prefix = rtrim( $prefix, '.' ); } /** * @param string $key * @return string */ private function addPrefixToKey( $key ) { return $this->prefix . '.' . $key; } public function timing( $key, $time ) { return $this->factory->timing( $this->addPrefixToKey( $key ), $time ); } public function gauge( $key, $value ) { return $this->factory->gauge( $this->addPrefixToKey( $key ), $value ); } public function set( $key, $value ) { return $this->factory->set( $this->addPrefixToKey( $key ), $value ); } public function increment( $key ) { return $this->factory->increment( $this->addPrefixToKey( $key ) ); } public function decrement( $key ) { return $this->factory->decrement( $this->addPrefixToKey( $key ) ); } public function updateCount( $key, $delta ) { return $this->factory->updateCount( $this->addPrefixToKey( $key ), $delta ); } public function produceStatsdData( $key, $value = 1, $metric = StatsdDataInterface::STATSD_METRIC_COUNT ) { return $this->factory->produceStatsdData( $this->addPrefixToKey( $key ), $value, $metric ); } }