Closed thompsa closed 6 years ago
When checking the label name it displays metricName on error.
diff --git a/src/Prometheus/Collector.php b/src/Prometheus/Collector.php index 7efc5d6..edc5e80 100644 --- a/src/Prometheus/Collector.php +++ b/src/Prometheus/Collector.php @@ -32,7 +32,7 @@ abstract class Collector $this->help = $help; foreach ($labels as $label) { if (!preg_match(self::RE_METRIC_LABEL_NAME, $label)) { - throw new \InvalidArgumentException("Invalid label name: '" . $metricName . "'"); + throw new \InvalidArgumentException("Invalid label name: '" . $label . "'"); } } $this->labels = $labels;
Fixed in #66.
When checking the label name it displays metricName on error.