@@ -99,7 +99,7 @@ public function registerGauge(string $namespace, string $name, string $help, arr
9999 {
100100 $ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
101101 if (isset ($ this ->gauges [$ metricIdentifier ])) {
102- throw new MetricsRegistrationException ("Metric already registered " );
102+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
103103 }
104104 $ this ->gauges [$ metricIdentifier ] = new Gauge (
105105 $ this ->storageAdapter ,
@@ -159,7 +159,7 @@ public function registerCounter(string $namespace, string $name, string $help, a
159159 {
160160 $ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
161161 if (isset ($ this ->counters [$ metricIdentifier ])) {
162- throw new MetricsRegistrationException ("Metric already registered " );
162+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
163163 }
164164 $ this ->counters [$ metricIdentifier ] = new Counter (
165165 $ this ->storageAdapter ,
@@ -225,7 +225,7 @@ public function registerHistogram(
225225 ): Histogram {
226226 $ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
227227 if (isset ($ this ->histograms [$ metricIdentifier ])) {
228- throw new MetricsRegistrationException ("Metric already registered " );
228+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
229229 }
230230 $ this ->histograms [$ metricIdentifier ] = new Histogram (
231231 $ this ->storageAdapter ,
@@ -301,7 +301,7 @@ public function registerSummary(
301301 ): Summary {
302302 $ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
303303 if (isset ($ this ->summaries [$ metricIdentifier ])) {
304- throw new MetricsRegistrationException ("Metric already registered " );
304+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
305305 }
306306 $ this ->summaries [$ metricIdentifier ] = new Summary (
307307 $ this ->storageAdapter ,
0 commit comments