baseMetric->getStatsdNamespaces() as $namespace ) { $this->baseMetric->getStatsdDataFactory()->gauge( $namespace, $value ); } try { $this->baseMetric->addSample( new Sample( $this->baseMetric->getLabelValues(), $value ) ); } catch ( IllegalOperationException $ex ) { // Log the condition and give the caller something that will absorb calls. trigger_error( $ex->getMessage(), E_USER_WARNING ); } } /** @inheritDoc */ public function getTypeIndicator(): string { return self::TYPE_INDICATOR; } }