@@ -99,7 +99,7 @@ public function registerGauge(string $namespace, string $name, string $help, arr
99
99
{
100
100
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
101
101
if (isset ($ this ->gauges [$ metricIdentifier ])) {
102
- throw new MetricsRegistrationException ("Metric already registered " );
102
+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
103
103
}
104
104
$ this ->gauges [$ metricIdentifier ] = new Gauge (
105
105
$ this ->storageAdapter ,
@@ -159,7 +159,7 @@ public function registerCounter(string $namespace, string $name, string $help, a
159
159
{
160
160
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
161
161
if (isset ($ this ->counters [$ metricIdentifier ])) {
162
- throw new MetricsRegistrationException ("Metric already registered " );
162
+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
163
163
}
164
164
$ this ->counters [$ metricIdentifier ] = new Counter (
165
165
$ this ->storageAdapter ,
@@ -225,7 +225,7 @@ public function registerHistogram(
225
225
): Histogram {
226
226
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
227
227
if (isset ($ this ->histograms [$ metricIdentifier ])) {
228
- throw new MetricsRegistrationException ("Metric already registered " );
228
+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
229
229
}
230
230
$ this ->histograms [$ metricIdentifier ] = new Histogram (
231
231
$ this ->storageAdapter ,
@@ -301,7 +301,7 @@ public function registerSummary(
301
301
): Summary {
302
302
$ metricIdentifier = self ::metricIdentifier ($ namespace , $ name );
303
303
if (isset ($ this ->summaries [$ metricIdentifier ])) {
304
- throw new MetricsRegistrationException ("Metric already registered " );
304
+ throw new MetricsRegistrationException ("Metric ` . $ metricIdentifier . ` already registered " );
305
305
}
306
306
$ this ->summaries [$ metricIdentifier ] = new Summary (
307
307
$ this ->storageAdapter ,
0 commit comments