diff --git a/lib/logger/logger.go b/lib/logger/logger.go index ab411e3f0..80e7a97a7 100644 --- a/lib/logger/logger.go +++ b/lib/logger/logger.go @@ -123,7 +123,8 @@ func logMessage(level, msg string, skipframes int) { mu.Unlock() // Increment vm_log_messages_total - counterName := fmt.Sprintf(`vm_log_messages_total{app_version=%q, level=%q, file=%q, line="%d"}`, buildinfo.Version, levelLowercase, file, line) + location := fmt.Sprintf("%s:%d", file, line) + counterName := fmt.Sprintf(`vm_log_messages_total{app_version=%q, level=%q, location=%q}`, buildinfo.Version, levelLowercase, location) metrics.GetOrCreateCounter(counterName).Inc() switch level {