File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ func prometheusize(s string) string {
173
173
if renamed , exists := prometheusizeCache [s ]; exists {
174
174
return renamed
175
175
}
176
- back := strings .Clone (s )
176
+ backup := strings .Clone (s )
177
177
178
178
for _ , pair := range prefixes {
179
179
if strings .HasPrefix (s , pair [0 ]+ "." ) {
@@ -186,10 +186,10 @@ func prometheusize(s string) string {
186
186
s = dollarRe .ReplaceAllString (s , "" )
187
187
s = repeatedUnderscoresRe .ReplaceAllString (s , "_" )
188
188
s = strings .TrimPrefix (s , "_" )
189
+ s = exporterPrefix + s
189
190
190
- prometheusizeCache [back ] = strings .Clone (s )
191
-
192
- return exporterPrefix + s
191
+ prometheusizeCache [backup ] = strings .Clone (s )
192
+ return s
193
193
}
194
194
195
195
// nameAndLabel checks if there are predefined metric name and label for that metric or
You can’t perform that action at this time.
0 commit comments