Debian Codegraph @

debian/patches/0007-Add-Go-1.27-runtime-metrics-support.patch

raw
1 From: Sascha Steinbiss <[email protected]>
2 Date: Mon, 07 Sep 2026 00:00:00 +0200
3 Subject: Add Go 1.27 runtime metrics support
4
5 Building with Go 1.27 FTBFS (Bug#1146000): go_collector_latest_test.go,
6 the fixture used as a fallback for any Go version without a matching
7 go_collector_go1XX_test.go, does not know about the GODEBUG counters
8 that Go 1.27 added to runtime/metrics, so TestGoCollector_ExposedMetrics
9 fails on an "unexpected metric" it doesn't recognise
10 (go_godebug_non_default_behavior_fips140ems_events_total).
11
12 Go 1.27 changes the set of runtime/metrics exposed via the Go collector:
13 it adds a new GODEBUG counter for TLS Extended Master Secret enforcement
14 under FIPS 140 mode (fips140ems) and one for platform certificate
15 override behaviour (x509sslcertoverrideplatform), while several expired
16 GODEBUG settings from older Go releases (asynctimerchan, gotypesalias,
17 tls10server, tls3des, tlsrsakex, tlsunsafeekm, x509keypairleaf) are
18 removed.
19
20 Fix this the same way Go 1.24/1.25/1.26 were handled before: add a
21 dedicated pair of go_collector_go127_test.go /
22 go_collector_metrics_go127_test.go fixtures, tagged "go1.27 && !go1.28"
23 so they are picked up instead of the "latest" fallback when building
24 with Go 1.27. Their content is taken verbatim from upstream commit
25 57bb367da472cadc62ac8210c55ea2cd83143e5c ("Update Go Collector metrics
26 for new Go version (#2095)"), which added exactly these two files
27 upstream.
28
29 Issue debugged and patch created with LLM assistance.
30
31 Bug-Debian: https://bugs.debian.org/1146000
32 Origin: https://github.com/prometheus/client_golang/commit/57bb367da472cadc62ac8210c55ea2cd83143e5c
33 Forwarded: not-needed
34 ---
35 --- /dev/null
36 +++ b/prometheus/collectors/go_collector_go127_test.go
37 @@ -0,0 +1,258 @@
38 +// Copyright 2022 The Prometheus Authors
39 +// Licensed under the Apache License, Version 2.0 (the "License");
40 +// you may not use this file except in compliance with the License.
41 +// You may obtain a copy of the License at
42 +//
43 +// http://www.apache.org/licenses/LICENSE-2.0
44 +//
45 +// Unless required by applicable law or agreed to in writing, software
46 +// distributed under the License is distributed on an "AS IS" BASIS,
47 +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48 +// See the License for the specific language governing permissions and
49 +// limitations under the License.
50 +
51 +//go:build go1.27 && !go1.28
52 +// +build go1.27,!go1.28
53 +
54 +package collectors
55 +
56 +func withAllMetrics() []string {
57 + return withBaseMetrics([]string{
58 + "go_cgo_go_to_c_calls_calls_total",
59 + "go_cpu_classes_gc_mark_assist_cpu_seconds_total",
60 + "go_cpu_classes_gc_mark_dedicated_cpu_seconds_total",
61 + "go_cpu_classes_gc_mark_idle_cpu_seconds_total",
62 + "go_cpu_classes_gc_pause_cpu_seconds_total",
63 + "go_cpu_classes_gc_total_cpu_seconds_total",
64 + "go_cpu_classes_idle_cpu_seconds_total",
65 + "go_cpu_classes_scavenge_assist_cpu_seconds_total",
66 + "go_cpu_classes_scavenge_background_cpu_seconds_total",
67 + "go_cpu_classes_scavenge_total_cpu_seconds_total",
68 + "go_cpu_classes_total_cpu_seconds_total",
69 + "go_cpu_classes_user_cpu_seconds_total",
70 + "go_gc_cleanups_executed_cleanups_total",
71 + "go_gc_cleanups_queued_cleanups_total",
72 + "go_gc_cycles_automatic_gc_cycles_total",
73 + "go_gc_cycles_forced_gc_cycles_total",
74 + "go_gc_cycles_total_gc_cycles_total",
75 + "go_gc_finalizers_executed_finalizers_total",
76 + "go_gc_finalizers_queued_finalizers_total",
77 + "go_gc_gogc_percent",
78 + "go_gc_gomemlimit_bytes",
79 + "go_gc_heap_allocs_by_size_bytes",
80 + "go_gc_heap_allocs_bytes_total",
81 + "go_gc_heap_allocs_objects_total",
82 + "go_gc_heap_frees_by_size_bytes",
83 + "go_gc_heap_frees_bytes_total",
84 + "go_gc_heap_frees_objects_total",
85 + "go_gc_heap_goal_bytes",
86 + "go_gc_heap_live_bytes",
87 + "go_gc_heap_objects_objects",
88 + "go_gc_heap_tiny_allocs_objects_total",
89 + "go_gc_limiter_last_enabled_gc_cycle",
90 + "go_gc_pauses_seconds",
91 + "go_gc_scan_globals_bytes",
92 + "go_gc_scan_heap_bytes",
93 + "go_gc_scan_stack_bytes",
94 + "go_gc_scan_total_bytes",
95 + "go_gc_stack_starting_size_bytes",
96 + "go_godebug_non_default_behavior_allowmultiplevcs_events_total",
97 + "go_godebug_non_default_behavior_containermaxprocs_events_total",
98 + "go_godebug_non_default_behavior_cryptocustomrand_events_total",
99 + "go_godebug_non_default_behavior_embedfollowsymlinks_events_total",
100 + "go_godebug_non_default_behavior_execerrdot_events_total",
101 + "go_godebug_non_default_behavior_fips140ems_events_total",
102 + "go_godebug_non_default_behavior_gocachehash_events_total",
103 + "go_godebug_non_default_behavior_gocachetest_events_total",
104 + "go_godebug_non_default_behavior_gocacheverify_events_total",
105 + "go_godebug_non_default_behavior_gotestjsonbuildtext_events_total",
106 + "go_godebug_non_default_behavior_htmlmetacontenturlescape_events_total",
107 + "go_godebug_non_default_behavior_http2client_events_total",
108 + "go_godebug_non_default_behavior_http2server_events_total",
109 + "go_godebug_non_default_behavior_httpcookiemaxnum_events_total",
110 + "go_godebug_non_default_behavior_httplaxcontentlength_events_total",
111 + "go_godebug_non_default_behavior_httpmuxgo121_events_total",
112 + "go_godebug_non_default_behavior_httpservecontentkeepheaders_events_total",
113 + "go_godebug_non_default_behavior_installgoroot_events_total",
114 + "go_godebug_non_default_behavior_multipartmaxheaders_events_total",
115 + "go_godebug_non_default_behavior_multipartmaxparts_events_total",
116 + "go_godebug_non_default_behavior_multipathtcp_events_total",
117 + "go_godebug_non_default_behavior_netedns0_events_total",
118 + "go_godebug_non_default_behavior_panicnil_events_total",
119 + "go_godebug_non_default_behavior_randautoseed_events_total",
120 + "go_godebug_non_default_behavior_randseednop_events_total",
121 + "go_godebug_non_default_behavior_rsa1024min_events_total",
122 + "go_godebug_non_default_behavior_tarinsecurepath_events_total",
123 + "go_godebug_non_default_behavior_tlsmaxrsasize_events_total",
124 + "go_godebug_non_default_behavior_tlssha1_events_total",
125 + "go_godebug_non_default_behavior_updatemaxprocs_events_total",
126 + "go_godebug_non_default_behavior_urlmaxqueryparams_events_total",
127 + "go_godebug_non_default_behavior_urlstrictcolons_events_total",
128 + "go_godebug_non_default_behavior_winreadlinkvolume_events_total",
129 + "go_godebug_non_default_behavior_winsymlink_events_total",
130 + "go_godebug_non_default_behavior_x509negativeserial_events_total",
131 + "go_godebug_non_default_behavior_x509rsacrt_events_total",
132 + "go_godebug_non_default_behavior_x509sha256skid_events_total",
133 + "go_godebug_non_default_behavior_x509sslcertoverrideplatform_events_total",
134 + "go_godebug_non_default_behavior_x509usefallbackroots_events_total",
135 + "go_godebug_non_default_behavior_x509usepolicies_events_total",
136 + "go_godebug_non_default_behavior_zipinsecurepath_events_total",
137 + "go_memory_classes_heap_free_bytes",
138 + "go_memory_classes_heap_objects_bytes",
139 + "go_memory_classes_heap_released_bytes",
140 + "go_memory_classes_heap_stacks_bytes",
141 + "go_memory_classes_heap_unused_bytes",
142 + "go_memory_classes_metadata_mcache_free_bytes",
143 + "go_memory_classes_metadata_mcache_inuse_bytes",
144 + "go_memory_classes_metadata_mspan_free_bytes",
145 + "go_memory_classes_metadata_mspan_inuse_bytes",
146 + "go_memory_classes_metadata_other_bytes",
147 + "go_memory_classes_os_stacks_bytes",
148 + "go_memory_classes_other_bytes",
149 + "go_memory_classes_profiling_buckets_bytes",
150 + "go_memory_classes_total_bytes",
151 + "go_sched_gomaxprocs_threads",
152 + "go_sched_goroutines_created_goroutines_total",
153 + "go_sched_goroutines_goroutines",
154 + "go_sched_goroutines_not_in_go_goroutines",
155 + "go_sched_goroutines_runnable_goroutines",
156 + "go_sched_goroutines_running_goroutines",
157 + "go_sched_goroutines_waiting_goroutines",
158 + "go_sched_latencies_seconds",
159 + "go_sched_pauses_stopping_gc_seconds",
160 + "go_sched_pauses_stopping_other_seconds",
161 + "go_sched_pauses_total_gc_seconds",
162 + "go_sched_pauses_total_other_seconds",
163 + "go_sched_threads_total_threads",
164 + "go_sync_mutex_wait_total_seconds_total",
165 + })
166 +}
167 +
168 +func withGCMetrics() []string {
169 + return withBaseMetrics([]string{
170 + "go_gc_cleanups_executed_cleanups_total",
171 + "go_gc_cleanups_queued_cleanups_total",
172 + "go_gc_cycles_automatic_gc_cycles_total",
173 + "go_gc_cycles_forced_gc_cycles_total",
174 + "go_gc_cycles_total_gc_cycles_total",
175 + "go_gc_finalizers_executed_finalizers_total",
176 + "go_gc_finalizers_queued_finalizers_total",
177 + "go_gc_gogc_percent",
178 + "go_gc_gomemlimit_bytes",
179 + "go_gc_heap_allocs_by_size_bytes",
180 + "go_gc_heap_allocs_bytes_total",
181 + "go_gc_heap_allocs_objects_total",
182 + "go_gc_heap_frees_by_size_bytes",
183 + "go_gc_heap_frees_bytes_total",
184 + "go_gc_heap_frees_objects_total",
185 + "go_gc_heap_goal_bytes",
186 + "go_gc_heap_live_bytes",
187 + "go_gc_heap_objects_objects",
188 + "go_gc_heap_tiny_allocs_objects_total",
189 + "go_gc_limiter_last_enabled_gc_cycle",
190 + "go_gc_pauses_seconds",
191 + "go_gc_scan_globals_bytes",
192 + "go_gc_scan_heap_bytes",
193 + "go_gc_scan_stack_bytes",
194 + "go_gc_scan_total_bytes",
195 + "go_gc_stack_starting_size_bytes",
196 + })
197 +}
198 +
199 +func withMemoryMetrics() []string {
200 + return withBaseMetrics([]string{
201 + "go_memory_classes_heap_free_bytes",
202 + "go_memory_classes_heap_objects_bytes",
203 + "go_memory_classes_heap_released_bytes",
204 + "go_memory_classes_heap_stacks_bytes",
205 + "go_memory_classes_heap_unused_bytes",
206 + "go_memory_classes_metadata_mcache_free_bytes",
207 + "go_memory_classes_metadata_mcache_inuse_bytes",
208 + "go_memory_classes_metadata_mspan_free_bytes",
209 + "go_memory_classes_metadata_mspan_inuse_bytes",
210 + "go_memory_classes_metadata_other_bytes",
211 + "go_memory_classes_os_stacks_bytes",
212 + "go_memory_classes_other_bytes",
213 + "go_memory_classes_profiling_buckets_bytes",
214 + "go_memory_classes_total_bytes",
215 + })
216 +}
217 +
218 +func withSchedulerMetrics() []string {
219 + return withBaseMetrics([]string{
220 + "go_sched_gomaxprocs_threads",
221 + "go_sched_goroutines_created_goroutines_total",
222 + "go_sched_goroutines_goroutines",
223 + "go_sched_goroutines_not_in_go_goroutines",
224 + "go_sched_goroutines_runnable_goroutines",
225 + "go_sched_goroutines_running_goroutines",
226 + "go_sched_goroutines_waiting_goroutines",
227 + "go_sched_latencies_seconds",
228 + "go_sched_pauses_stopping_gc_seconds",
229 + "go_sched_pauses_stopping_other_seconds",
230 + "go_sched_pauses_total_gc_seconds",
231 + "go_sched_pauses_total_other_seconds",
232 + "go_sched_threads_total_threads",
233 + })
234 +}
235 +
236 +func withDebugMetrics() []string {
237 + return withBaseMetrics([]string{
238 + "go_godebug_non_default_behavior_allowmultiplevcs_events_total",
239 + "go_godebug_non_default_behavior_containermaxprocs_events_total",
240 + "go_godebug_non_default_behavior_cryptocustomrand_events_total",
241 + "go_godebug_non_default_behavior_embedfollowsymlinks_events_total",
242 + "go_godebug_non_default_behavior_execerrdot_events_total",
243 + "go_godebug_non_default_behavior_fips140ems_events_total",
244 + "go_godebug_non_default_behavior_gocachehash_events_total",
245 + "go_godebug_non_default_behavior_gocachetest_events_total",
246 + "go_godebug_non_default_behavior_gocacheverify_events_total",
247 + "go_godebug_non_default_behavior_gotestjsonbuildtext_events_total",
248 + "go_godebug_non_default_behavior_htmlmetacontenturlescape_events_total",
249 + "go_godebug_non_default_behavior_http2client_events_total",
250 + "go_godebug_non_default_behavior_http2server_events_total",
251 + "go_godebug_non_default_behavior_httpcookiemaxnum_events_total",
252 + "go_godebug_non_default_behavior_httplaxcontentlength_events_total",
253 + "go_godebug_non_default_behavior_httpmuxgo121_events_total",
254 + "go_godebug_non_default_behavior_httpservecontentkeepheaders_events_total",
255 + "go_godebug_non_default_behavior_installgoroot_events_total",
256 + "go_godebug_non_default_behavior_multipartmaxheaders_events_total",
257 + "go_godebug_non_default_behavior_multipartmaxparts_events_total",
258 + "go_godebug_non_default_behavior_multipathtcp_events_total",
259 + "go_godebug_non_default_behavior_netedns0_events_total",
260 + "go_godebug_non_default_behavior_panicnil_events_total",
261 + "go_godebug_non_default_behavior_randautoseed_events_total",
262 + "go_godebug_non_default_behavior_randseednop_events_total",
263 + "go_godebug_non_default_behavior_rsa1024min_events_total",
264 + "go_godebug_non_default_behavior_tarinsecurepath_events_total",
265 + "go_godebug_non_default_behavior_tlsmaxrsasize_events_total",
266 + "go_godebug_non_default_behavior_tlssha1_events_total",
267 + "go_godebug_non_default_behavior_updatemaxprocs_events_total",
268 + "go_godebug_non_default_behavior_urlmaxqueryparams_events_total",
269 + "go_godebug_non_default_behavior_urlstrictcolons_events_total",
270 + "go_godebug_non_default_behavior_winreadlinkvolume_events_total",
271 + "go_godebug_non_default_behavior_winsymlink_events_total",
272 + "go_godebug_non_default_behavior_x509negativeserial_events_total",
273 + "go_godebug_non_default_behavior_x509rsacrt_events_total",
274 + "go_godebug_non_default_behavior_x509sha256skid_events_total",
275 + "go_godebug_non_default_behavior_x509sslcertoverrideplatform_events_total",
276 + "go_godebug_non_default_behavior_x509usefallbackroots_events_total",
277 + "go_godebug_non_default_behavior_x509usepolicies_events_total",
278 + "go_godebug_non_default_behavior_zipinsecurepath_events_total",
279 + })
280 +}
281 +
282 +var (
283 + defaultRuntimeMetrics = []string{
284 + "go_gc_gogc_percent",
285 + "go_gc_gomemlimit_bytes",
286 + "go_sched_gomaxprocs_threads",
287 + }
288 + onlyGCDefRuntimeMetrics = []string{
289 + "go_gc_gogc_percent",
290 + "go_gc_gomemlimit_bytes",
291 + }
292 + onlySchedDefRuntimeMetrics = []string{
293 + "go_sched_gomaxprocs_threads",
294 + }
295 +)
296 --- /dev/null
297 +++ b/prometheus/go_collector_metrics_go127_test.go
298 @@ -0,0 +1,127 @@
299 +// Code generated by gen_go_collector_metrics_set.go; DO NOT EDIT.
300 +//go:generate go run gen_go_collector_metrics_set.go go1.27
301 +
302 +//go:build go1.27 && !go1.28
303 +// +build go1.27,!go1.28
304 +
305 +package prometheus
306 +
307 +var (
308 + expectedRuntimeMetrics = map[string]string{
309 + "/cgo/go-to-c-calls:calls": "go_cgo_go_to_c_calls_calls_total",
310 + "/cpu/classes/gc/mark/assist:cpu-seconds": "go_cpu_classes_gc_mark_assist_cpu_seconds_total",
311 + "/cpu/classes/gc/mark/dedicated:cpu-seconds": "go_cpu_classes_gc_mark_dedicated_cpu_seconds_total",
312 + "/cpu/classes/gc/mark/idle:cpu-seconds": "go_cpu_classes_gc_mark_idle_cpu_seconds_total",
313 + "/cpu/classes/gc/pause:cpu-seconds": "go_cpu_classes_gc_pause_cpu_seconds_total",
314 + "/cpu/classes/gc/total:cpu-seconds": "go_cpu_classes_gc_total_cpu_seconds_total",
315 + "/cpu/classes/idle:cpu-seconds": "go_cpu_classes_idle_cpu_seconds_total",
316 + "/cpu/classes/scavenge/assist:cpu-seconds": "go_cpu_classes_scavenge_assist_cpu_seconds_total",
317 + "/cpu/classes/scavenge/background:cpu-seconds": "go_cpu_classes_scavenge_background_cpu_seconds_total",
318 + "/cpu/classes/scavenge/total:cpu-seconds": "go_cpu_classes_scavenge_total_cpu_seconds_total",
319 + "/cpu/classes/total:cpu-seconds": "go_cpu_classes_total_cpu_seconds_total",
320 + "/cpu/classes/user:cpu-seconds": "go_cpu_classes_user_cpu_seconds_total",
321 + "/gc/cleanups/executed:cleanups": "go_gc_cleanups_executed_cleanups_total",
322 + "/gc/cleanups/queued:cleanups": "go_gc_cleanups_queued_cleanups_total",
323 + "/gc/cycles/automatic:gc-cycles": "go_gc_cycles_automatic_gc_cycles_total",
324 + "/gc/cycles/forced:gc-cycles": "go_gc_cycles_forced_gc_cycles_total",
325 + "/gc/cycles/total:gc-cycles": "go_gc_cycles_total_gc_cycles_total",
326 + "/gc/finalizers/executed:finalizers": "go_gc_finalizers_executed_finalizers_total",
327 + "/gc/finalizers/queued:finalizers": "go_gc_finalizers_queued_finalizers_total",
328 + "/gc/gogc:percent": "go_gc_gogc_percent",
329 + "/gc/gomemlimit:bytes": "go_gc_gomemlimit_bytes",
330 + "/gc/heap/allocs-by-size:bytes": "go_gc_heap_allocs_by_size_bytes",
331 + "/gc/heap/allocs:bytes": "go_gc_heap_allocs_bytes_total",
332 + "/gc/heap/allocs:objects": "go_gc_heap_allocs_objects_total",
333 + "/gc/heap/frees-by-size:bytes": "go_gc_heap_frees_by_size_bytes",
334 + "/gc/heap/frees:bytes": "go_gc_heap_frees_bytes_total",
335 + "/gc/heap/frees:objects": "go_gc_heap_frees_objects_total",
336 + "/gc/heap/goal:bytes": "go_gc_heap_goal_bytes",
337 + "/gc/heap/live:bytes": "go_gc_heap_live_bytes",
338 + "/gc/heap/objects:objects": "go_gc_heap_objects_objects",
339 + "/gc/heap/tiny/allocs:objects": "go_gc_heap_tiny_allocs_objects_total",
340 + "/gc/limiter/last-enabled:gc-cycle": "go_gc_limiter_last_enabled_gc_cycle",
341 + "/gc/pauses:seconds": "go_gc_pauses_seconds",
342 + "/gc/scan/globals:bytes": "go_gc_scan_globals_bytes",
343 + "/gc/scan/heap:bytes": "go_gc_scan_heap_bytes",
344 + "/gc/scan/stack:bytes": "go_gc_scan_stack_bytes",
345 + "/gc/scan/total:bytes": "go_gc_scan_total_bytes",
346 + "/gc/stack/starting-size:bytes": "go_gc_stack_starting_size_bytes",
347 + "/godebug/non-default-behavior/allowmultiplevcs:events": "go_godebug_non_default_behavior_allowmultiplevcs_events_total",
348 + "/godebug/non-default-behavior/containermaxprocs:events": "go_godebug_non_default_behavior_containermaxprocs_events_total",
349 + "/godebug/non-default-behavior/cryptocustomrand:events": "go_godebug_non_default_behavior_cryptocustomrand_events_total",
350 + "/godebug/non-default-behavior/embedfollowsymlinks:events": "go_godebug_non_default_behavior_embedfollowsymlinks_events_total",
351 + "/godebug/non-default-behavior/execerrdot:events": "go_godebug_non_default_behavior_execerrdot_events_total",
352 + "/godebug/non-default-behavior/fips140ems:events": "go_godebug_non_default_behavior_fips140ems_events_total",
353 + "/godebug/non-default-behavior/gocachehash:events": "go_godebug_non_default_behavior_gocachehash_events_total",
354 + "/godebug/non-default-behavior/gocachetest:events": "go_godebug_non_default_behavior_gocachetest_events_total",
355 + "/godebug/non-default-behavior/gocacheverify:events": "go_godebug_non_default_behavior_gocacheverify_events_total",
356 + "/godebug/non-default-behavior/gotestjsonbuildtext:events": "go_godebug_non_default_behavior_gotestjsonbuildtext_events_total",
357 + "/godebug/non-default-behavior/htmlmetacontenturlescape:events": "go_godebug_non_default_behavior_htmlmetacontenturlescape_events_total",
358 + "/godebug/non-default-behavior/http2client:events": "go_godebug_non_default_behavior_http2client_events_total",
359 + "/godebug/non-default-behavior/http2server:events": "go_godebug_non_default_behavior_http2server_events_total",
360 + "/godebug/non-default-behavior/httpcookiemaxnum:events": "go_godebug_non_default_behavior_httpcookiemaxnum_events_total",
361 + "/godebug/non-default-behavior/httplaxcontentlength:events": "go_godebug_non_default_behavior_httplaxcontentlength_events_total",
362 + "/godebug/non-default-behavior/httpmuxgo121:events": "go_godebug_non_default_behavior_httpmuxgo121_events_total",
363 + "/godebug/non-default-behavior/httpservecontentkeepheaders:events": "go_godebug_non_default_behavior_httpservecontentkeepheaders_events_total",
364 + "/godebug/non-default-behavior/installgoroot:events": "go_godebug_non_default_behavior_installgoroot_events_total",
365 + "/godebug/non-default-behavior/multipartmaxheaders:events": "go_godebug_non_default_behavior_multipartmaxheaders_events_total",
366 + "/godebug/non-default-behavior/multipartmaxparts:events": "go_godebug_non_default_behavior_multipartmaxparts_events_total",
367 + "/godebug/non-default-behavior/multipathtcp:events": "go_godebug_non_default_behavior_multipathtcp_events_total",
368 + "/godebug/non-default-behavior/netedns0:events": "go_godebug_non_default_behavior_netedns0_events_total",
369 + "/godebug/non-default-behavior/panicnil:events": "go_godebug_non_default_behavior_panicnil_events_total",
370 + "/godebug/non-default-behavior/randautoseed:events": "go_godebug_non_default_behavior_randautoseed_events_total",
371 + "/godebug/non-default-behavior/randseednop:events": "go_godebug_non_default_behavior_randseednop_events_total",
372 + "/godebug/non-default-behavior/rsa1024min:events": "go_godebug_non_default_behavior_rsa1024min_events_total",
373 + "/godebug/non-default-behavior/tarinsecurepath:events": "go_godebug_non_default_behavior_tarinsecurepath_events_total",
374 + "/godebug/non-default-behavior/tlsmaxrsasize:events": "go_godebug_non_default_behavior_tlsmaxrsasize_events_total",
375 + "/godebug/non-default-behavior/tlssha1:events": "go_godebug_non_default_behavior_tlssha1_events_total",
376 + "/godebug/non-default-behavior/updatemaxprocs:events": "go_godebug_non_default_behavior_updatemaxprocs_events_total",
377 + "/godebug/non-default-behavior/urlmaxqueryparams:events": "go_godebug_non_default_behavior_urlmaxqueryparams_events_total",
378 + "/godebug/non-default-behavior/urlstrictcolons:events": "go_godebug_non_default_behavior_urlstrictcolons_events_total",
379 + "/godebug/non-default-behavior/winreadlinkvolume:events": "go_godebug_non_default_behavior_winreadlinkvolume_events_total",
380 + "/godebug/non-default-behavior/winsymlink:events": "go_godebug_non_default_behavior_winsymlink_events_total",
381 + "/godebug/non-default-behavior/x509negativeserial:events": "go_godebug_non_default_behavior_x509negativeserial_events_total",
382 + "/godebug/non-default-behavior/x509rsacrt:events": "go_godebug_non_default_behavior_x509rsacrt_events_total",
383 + "/godebug/non-default-behavior/x509sha256skid:events": "go_godebug_non_default_behavior_x509sha256skid_events_total",
384 + "/godebug/non-default-behavior/x509sslcertoverrideplatform:events": "go_godebug_non_default_behavior_x509sslcertoverrideplatform_events_total",
385 + "/godebug/non-default-behavior/x509usefallbackroots:events": "go_godebug_non_default_behavior_x509usefallbackroots_events_total",
386 + "/godebug/non-default-behavior/x509usepolicies:events": "go_godebug_non_default_behavior_x509usepolicies_events_total",
387 + "/godebug/non-default-behavior/zipinsecurepath:events": "go_godebug_non_default_behavior_zipinsecurepath_events_total",
388 + "/memory/classes/heap/free:bytes": "go_memory_classes_heap_free_bytes",
389 + "/memory/classes/heap/objects:bytes": "go_memory_classes_heap_objects_bytes",
390 + "/memory/classes/heap/released:bytes": "go_memory_classes_heap_released_bytes",
391 + "/memory/classes/heap/stacks:bytes": "go_memory_classes_heap_stacks_bytes",
392 + "/memory/classes/heap/unused:bytes": "go_memory_classes_heap_unused_bytes",
393 + "/memory/classes/metadata/mcache/free:bytes": "go_memory_classes_metadata_mcache_free_bytes",
394 + "/memory/classes/metadata/mcache/inuse:bytes": "go_memory_classes_metadata_mcache_inuse_bytes",
395 + "/memory/classes/metadata/mspan/free:bytes": "go_memory_classes_metadata_mspan_free_bytes",
396 + "/memory/classes/metadata/mspan/inuse:bytes": "go_memory_classes_metadata_mspan_inuse_bytes",
397 + "/memory/classes/metadata/other:bytes": "go_memory_classes_metadata_other_bytes",
398 + "/memory/classes/os-stacks:bytes": "go_memory_classes_os_stacks_bytes",
399 + "/memory/classes/other:bytes": "go_memory_classes_other_bytes",
400 + "/memory/classes/profiling/buckets:bytes": "go_memory_classes_profiling_buckets_bytes",
401 + "/memory/classes/total:bytes": "go_memory_classes_total_bytes",
402 + "/sched/gomaxprocs:threads": "go_sched_gomaxprocs_threads",
403 + "/sched/goroutines-created:goroutines": "go_sched_goroutines_created_goroutines_total",
404 + "/sched/goroutines/not-in-go:goroutines": "go_sched_goroutines_not_in_go_goroutines",
405 + "/sched/goroutines/runnable:goroutines": "go_sched_goroutines_runnable_goroutines",
406 + "/sched/goroutines/running:goroutines": "go_sched_goroutines_running_goroutines",
407 + "/sched/goroutines/waiting:goroutines": "go_sched_goroutines_waiting_goroutines",
408 + "/sched/goroutines:goroutines": "go_sched_goroutines_goroutines",
409 + "/sched/latencies:seconds": "go_sched_latencies_seconds",
410 + "/sched/pauses/stopping/gc:seconds": "go_sched_pauses_stopping_gc_seconds",
411 + "/sched/pauses/stopping/other:seconds": "go_sched_pauses_stopping_other_seconds",
412 + "/sched/pauses/total/gc:seconds": "go_sched_pauses_total_gc_seconds",
413 + "/sched/pauses/total/other:seconds": "go_sched_pauses_total_other_seconds",
414 + "/sched/threads/total:threads": "go_sched_threads_total_threads",
415 + "/sync/mutex/wait/total:seconds": "go_sync_mutex_wait_total_seconds_total",
416 + }
417 +
418 + expMetrics = map[string]string{
419 + "/gc/gogc:percent": "go_gc_gogc_percent",
420 + "/gc/gomemlimit:bytes": "go_gc_gomemlimit_bytes",
421 + "/sched/gomaxprocs:threads": "go_sched_gomaxprocs_threads",
422 + }
423 +)
424 +
425 +const expectedRuntimeMetricsCardinality = 187