Commit 0269c79
committed
Merge #1574: Overhaul stats: Fix Prometheus export to include only one HELP and TYPE lines per metric
02433cb fix: [#1569] Prometheus txt export format. Only one HELP and TYPE header per metric (Jose Celano)
Pull request description:
Fix Prometheus export to include only one `HELP` and `TYPE` lines per metric.
Current format:
```
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (BC)",client_software_version="0087"} 4
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (FD66)",client_software_version=""} 1
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (SP)",client_software_version="3605"} 631
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (TIX0325)",client_software_version=""} 14
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (BC)",client_software_version="0202"} 6754
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (XF)",client_software_version="9400"} 1
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (BC)",client_software_version="0090"} 7
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Transmission",client_software_version="2.32"} 1
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (61-b39e)",client_software_version=""} 1
```
Expected format:
```
# HELP udp_tracker_server_connection_id_errors_total Total number of requests with connection ID errors
# TYPE udp_tracker_server_connection_id_errors_total counter
udp_tracker_server_connection_id_errors_total{client_software_name="Other (BC)",client_software_version="0087"} 4
udp_tracker_server_connection_id_errors_total{client_software_name="Other (FD66)",client_software_version=""} 1
udp_tracker_server_connection_id_errors_total{client_software_name="Other (SP)",client_software_version="3605"} 631
udp_tracker_server_connection_id_errors_total{client_software_name="Other (TIX0325)",client_software_version=""} 14
udp_tracker_server_connection_id_errors_total{client_software_name="Other (BC)",client_software_version="0202"} 6754
udp_tracker_server_connection_id_errors_total{client_software_name="Other (XF)",client_software_version="9400"} 1
udp_tracker_server_connection_id_errors_total{client_software_name="Other (BC)",client_software_version="0090"} 7
udp_tracker_server_connection_id_errors_total{client_software_name="Transmission",client_software_version="2.32"} 1
udp_tracker_server_connection_id_errors_total{client_software_name="Other (61-b39e)",client_software_version=""} 1
```
A line break has also been added after each metric to improve readability.
ACKs for top commit:
josecelano:
ACK 02433cb
Tree-SHA512: 246c473aef425e3560d6ae99dde279aad0637315fbb6351b1ea7fa100f00b00eb6b5dee85fac141892dbb3b5d4c548fdd4b421bc6721c910fd106bc01b5670f9File tree
6 files changed
+64
-95
lines changed- packages/metrics/src
- label
- metric
6 files changed
+64
-95
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 106 | | |
120 | 107 | | |
121 | 108 | | |
| |||
130 | 117 | | |
131 | 118 | | |
132 | 119 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
155 | 125 | | |
156 | 126 | | |
157 | 127 | | |
158 | 128 | | |
159 | 129 | | |
160 | | - | |
161 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
162 | 133 | | |
163 | 134 | | |
164 | | - | |
| 135 | + | |
| 136 | + | |
165 | 137 | | |
166 | | - | |
167 | 138 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
171 | 142 | | |
172 | 143 | | |
173 | | - | |
174 | 144 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
182 | 152 | | |
183 | | - | |
184 | 153 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
192 | 160 | | |
193 | 161 | | |
194 | 162 | | |
195 | 163 | | |
196 | 164 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 165 | + | |
205 | 166 | | |
206 | 167 | | |
207 | 168 | | |
208 | 169 | | |
209 | 170 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 171 | + | |
218 | 172 | | |
219 | 173 | | |
220 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
| 753 | + | |
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| |||
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
774 | 773 | | |
775 | 774 | | |
776 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| |||
0 commit comments