File tree Expand file tree Collapse file tree 3 files changed +44
-5
lines changed Expand file tree Collapse file tree 3 files changed +44
-5
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2024 The Prometheus Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ //go:build !go1.21
15
+ // +build !go1.21
16
+
17
+ package prometheus
18
+
19
+ var expMetrics = map [string ]string {
20
+ "/sched/gomaxprocs:threads" : "go_sched_gomaxprocs_threads" ,
21
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2024 The Prometheus Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ //go:build go1.21
15
+ // +build go1.21
16
+
17
+ package prometheus
18
+
19
+ var expMetrics = map [string ]string {
20
+ "/gc/gogc:percent" : "go_gc_gogc_percent" ,
21
+ "/gc/gomemlimit:bytes" : "go_gc_gomemlimit_bytes" ,
22
+ "/sched/gomaxprocs:threads" : "go_sched_gomaxprocs_threads" ,
23
+ }
Original file line number Diff line number Diff line change @@ -75,11 +75,6 @@ func addExpectedRuntimeMetrics(metrics map[string]struct{}) map[string]struct{}
75
75
}
76
76
77
77
func addExpectedDefaultRuntimeMetrics (metrics map [string ]struct {}) map [string ]struct {} {
78
- expMetrics := map [string ]string {
79
- "/gc/gogc:percent" : "go_gc_gogc_percent" ,
80
- "/gc/gomemlimit:bytes" : "go_gc_gomemlimit_bytes" ,
81
- "/sched/gomaxprocs:threads" : "go_sched_gomaxprocs_threads" ,
82
- }
83
78
for _ , e := range expMetrics {
84
79
metrics [e ] = struct {}{}
85
80
}
You can’t perform that action at this time.
0 commit comments