@@ -239,7 +239,7 @@ public final class PrometheusCollectorRegistry: Sendable {
239239 /// - Parameter descriptor: An ``MetricNameDescriptor`` that provides the fully qualified name for the metric.
240240 /// - Returns: A ``Counter`` that is registered with this ``PrometheusCollectorRegistry``
241241 public func makeCounter( descriptor: MetricNameDescriptor ) -> Counter {
242- return self . _makeCounter ( name: descriptor. name, labels: [ ] , help: descriptor. helpText)
242+ return self . _makeCounter ( name: descriptor. name, labels: [ ] , help: descriptor. helpText ?? " " )
243243 }
244244
245245 /// Creates a new ``Counter`` collector or returns the already existing one with the same name.
@@ -283,7 +283,7 @@ public final class PrometheusCollectorRegistry: Sendable {
283283 /// what’s actually being measured in a Prometheus metric.
284284 /// - Returns: A ``Counter`` that is registered with this ``PrometheusCollectorRegistry``
285285 public func makeCounter( descriptor: MetricNameDescriptor , labels: [ ( String , String ) ] ) -> Counter {
286- return self . _makeCounter ( name: descriptor. name, labels: labels, help: descriptor. helpText)
286+ return self . _makeCounter ( name: descriptor. name, labels: labels, help: descriptor. helpText ?? " " )
287287 }
288288
289289 /// Creates a new ``Gauge`` collector or returns the already existing one with the same name.
@@ -321,7 +321,7 @@ public final class PrometheusCollectorRegistry: Sendable {
321321 /// - Parameter descriptor: An ``MetricNameDescriptor`` that provides the fully qualified name for the metric.
322322 /// - Returns: A ``Gauge`` that is registered with this ``PrometheusCollectorRegistry``
323323 public func makeGauge( descriptor: MetricNameDescriptor ) -> Gauge {
324- return self . _makeGauge ( name: descriptor. name, labels: [ ] , help: descriptor. helpText)
324+ return self . _makeGauge ( name: descriptor. name, labels: [ ] , help: descriptor. helpText ?? " " )
325325 }
326326
327327 /// Creates a new ``Gauge`` collector or returns the already existing one with the same name.
@@ -365,7 +365,7 @@ public final class PrometheusCollectorRegistry: Sendable {
365365 /// what’s actually being measured in a Prometheus metric.
366366 /// - Returns: A ``Gauge`` that is registered with this ``PrometheusCollectorRegistry``
367367 public func makeGauge( descriptor: MetricNameDescriptor , labels: [ ( String , String ) ] ) -> Gauge {
368- return self . _makeGauge ( name: descriptor. name, labels: labels, help: descriptor. helpText)
368+ return self . _makeGauge ( name: descriptor. name, labels: labels, help: descriptor. helpText ?? " " )
369369 }
370370
371371 /// Creates a new ``DurationHistogram`` collector or returns the already existing one with the same name.
@@ -410,7 +410,7 @@ public final class PrometheusCollectorRegistry: Sendable {
410410 name: descriptor. name,
411411 labels: [ ] ,
412412 buckets: buckets,
413- help: descriptor. helpText
413+ help: descriptor. helpText ?? " "
414414 )
415415 }
416416
@@ -485,7 +485,7 @@ public final class PrometheusCollectorRegistry: Sendable {
485485 name: descriptor. name,
486486 labels: labels,
487487 buckets: buckets,
488- help: descriptor. helpText
488+ help: descriptor. helpText ?? " "
489489 )
490490 }
491491
@@ -531,7 +531,7 @@ public final class PrometheusCollectorRegistry: Sendable {
531531 name: descriptor. name,
532532 labels: [ ] ,
533533 buckets: buckets,
534- help: descriptor. helpText
534+ help: descriptor. helpText ?? " "
535535 )
536536 }
537537
@@ -606,7 +606,7 @@ public final class PrometheusCollectorRegistry: Sendable {
606606 name: descriptor. name,
607607 labels: labels,
608608 buckets: buckets,
609- help: descriptor. helpText
609+ help: descriptor. helpText ?? " "
610610 )
611611 }
612612
0 commit comments