File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,6 +126,9 @@ func computeRevision() (string, string) {
126126 tags = "unknown"
127127 modified bool
128128 )
129+ if race {
130+ tags = "race"
131+ }
129132
130133 buildInfo , ok := debug .ReadBuildInfo ()
131134 if ! ok {
@@ -141,7 +144,11 @@ func computeRevision() (string, string) {
141144 }
142145 }
143146 if v .Key == "-tags" {
144- tags = v .Value
147+ if race {
148+ tags = v .Value + ",race"
149+ } else {
150+ tags = v .Value
151+ }
145152 }
146153 }
147154 if modified {
Original file line number Diff line number Diff line change 1+ // Copyright 2026 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 !race
15+
16+ package version
17+
18+ var race = false
Original file line number Diff line number Diff line change 1+ // Copyright 2026 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 race
15+
16+ package version
17+
18+ var race = true
You can’t perform that action at this time.
0 commit comments