|
16 | 16 |
|
17 | 17 | package collectors |
18 | 18 |
|
19 | | -import "sort" |
20 | | - |
21 | 19 | func withAllMetrics() []string { |
22 | 20 | return withBaseMetrics([]string{ |
23 | 21 | "go_cgo_go_to_c_calls_calls_total", |
@@ -171,28 +169,3 @@ func withDebugMetrics() []string { |
171 | 169 | "go_godebug_non_default_behavior_zipinsecurepath_events_total", |
172 | 170 | }) |
173 | 171 | } |
174 | | - |
175 | | -var defaultRuntimeMetrics = []string{ |
176 | | - "go_gc_gogc_percent", |
177 | | - "go_gc_gomemlimit_bytes", |
178 | | - "go_sched_gomaxprocs_threads", |
179 | | -} |
180 | | - |
181 | | -func withDefaultRuntimeMetrics(metricNames []string, withoutGC, withoutSched bool) []string { |
182 | | - if withoutGC && withoutSched { |
183 | | - // If both flags are true, return the metricNames as is. |
184 | | - return metricNames |
185 | | - } else if withoutGC && !withoutSched { |
186 | | - // If only withoutGC is true, include "go_sched_gomaxprocs_threads" only. |
187 | | - metricNames = append(metricNames, []string{"go_sched_gomaxprocs_threads"}...) |
188 | | - } else if withoutSched && !withoutGC { |
189 | | - // If only withoutSched is true, exclude "go_sched_gomaxprocs_threads". |
190 | | - metricNames = append(metricNames, []string{"go_gc_gogc_percent", "go_gc_gomemlimit_bytes"}...) |
191 | | - } else { |
192 | | - // If neither flag is true, use the default metrics. |
193 | | - metricNames = append(metricNames, defaultRuntimeMetrics...) |
194 | | - } |
195 | | - // sorting is required |
196 | | - sort.Strings(metricNames) |
197 | | - return metricNames |
198 | | -} |
0 commit comments