From 2f07fc463616493145039b833cc36ac528ac7c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=A1=D0=BA=D1=83=D0=BB=D1=8C=D1=81=D0=BA=D0=B0=D1=8F?= Date: Thu, 21 Dec 2023 17:54:50 +0300 Subject: [PATCH] Metrics are created with _ between namespace and metric name instead of : --- src/Prometheus/Collector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Prometheus/Collector.php b/src/Prometheus/Collector.php index cbda884f..b977a9e4 100644 --- a/src/Prometheus/Collector.php +++ b/src/Prometheus/Collector.php @@ -42,7 +42,7 @@ abstract class Collector public function __construct(Adapter $storageAdapter, string $namespace, string $name, string $help, array $labels = []) { $this->storageAdapter = $storageAdapter; - $metricName = ($namespace !== '' ? $namespace . '_' : '') . $name; + $metricName = ($namespace !== '' ? $namespace . ':' : '') . $name; self::assertValidMetricName($metricName); $this->name = $metricName; $this->help = $help;