From a04f4a3d9a2aa63acd15ccba6a3f099ec7a04934 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 4 Aug 2020 20:24:30 +0300 Subject: [PATCH] app/vmselect: use warning level instead of info level for logging slow queries that take longer than `-search.logSlowQueryDuration` --- app/vmselect/promql/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/promql/exec.go b/app/vmselect/promql/exec.go index d3d1ef4a8c..2115b70d65 100644 --- a/app/vmselect/promql/exec.go +++ b/app/vmselect/promql/exec.go @@ -26,7 +26,7 @@ func Exec(ec *EvalConfig, q string, isFirstPointOnly bool) ([]netstorage.Result, defer func() { d := time.Since(startTime) if d >= *logSlowQueryDuration { - logger.Infof("slow query according to -search.logSlowQueryDuration=%s: duration=%.3f seconds, start=%d, end=%d, step=%d, accountID=%d, projectID=%d, query=%q", + logger.Warnf("slow query according to -search.logSlowQueryDuration=%s: duration=%.3f seconds, start=%d, end=%d, step=%d, accountID=%d, projectID=%d, query=%q", *logSlowQueryDuration, d.Seconds(), ec.Start/1000, ec.End/1000, ec.Step/1000, ec.AuthToken.AccountID, ec.AuthToken.ProjectID, q) slowQueries.Inc() }