@@ -27,7 +27,7 @@ public class Prometheus {
2727 initialValue: T = 0 ,
2828 withLabelType labelType: U . Type ) -> Counter < T , U >
2929 {
30- let counter = Counter < T , U > ( name, helpText, initialValue)
30+ let counter = Counter < T , U > ( name, helpText, initialValue, self )
3131 self . metrics. append ( counter)
3232 return counter
3333 }
@@ -69,7 +69,7 @@ public class Prometheus {
6969 initialValue: T = 0 ,
7070 withLabelType labelType: U . Type ) -> Gauge < T , U >
7171 {
72- let gauge = Gauge < T , U > ( name, helpText, initialValue)
72+ let gauge = Gauge < T , U > ( name, helpText, initialValue, self )
7373 self . metrics. append ( gauge)
7474 return gauge
7575 }
@@ -111,7 +111,7 @@ public class Prometheus {
111111 buckets: [ Double ] = defaultBuckets,
112112 labels: U ) -> Histogram < T , U >
113113 {
114- let histogram = Histogram < T , U > ( name, helpText, labels, buckets)
114+ let histogram = Histogram < T , U > ( name, helpText, labels, buckets, self )
115115 self . metrics. append ( histogram)
116116 return histogram
117117 }
@@ -143,7 +143,7 @@ public class Prometheus {
143143 quantiles: [ Double ] = defaultQuantiles,
144144 labels: U ) -> Summary < T , U >
145145 {
146- let summary = Summary < T , U > ( name, helpText, quantiles, labels)
146+ let summary = Summary < T , U > ( name, helpText, quantiles, labels, self )
147147 metrics. append ( summary)
148148 return summary
149149 }
0 commit comments