Beberlei\Metrics\Collector\Prometheus::getOrRegisterGaugeForVariable PHP Method

getOrRegisterGaugeForVariable() private method

private getOrRegisterGaugeForVariable ( string $variable ) : Prometheus\Gauge
$variable string
return Prometheus\Gauge
    private function getOrRegisterGaugeForVariable($variable)
    {
        try {
            $gauge = $this->collectorRegistry->getGauge($this->namespace, $variable);
        } catch (MetricNotFoundException $e) {
            $gauge = $this->collectorRegistry->registerGauge($this->namespace, $variable, '', array_keys($this->tags));
        }
        return $gauge;
    }