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 {
173173 if renamed , exists := prometheusizeCache [s ]; exists {
174174 return renamed
175175 }
176- back := strings .Clone (s )
176+ backup := strings .Clone (s )
177177
178178 for _ , pair := range prefixes {
179179 if strings .HasPrefix (s , pair [0 ]+ "." ) {
@@ -186,10 +186,10 @@ func prometheusize(s string) string {
186186 s = dollarRe .ReplaceAllString (s , "" )
187187 s = repeatedUnderscoresRe .ReplaceAllString (s , "_" )
188188 s = strings .TrimPrefix (s , "_" )
189+ s = exporterPrefix + s
189190
190- prometheusizeCache [back ] = strings .Clone (s )
191-
192- return exporterPrefix + s
191+ prometheusizeCache [backup ] = strings .Clone (s )
192+ return s
193193}
194194
195195// 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