mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
app/vmselect: use warning level instead of info level for logging slow queries that take longer than -search.logSlowQueryDuration
This commit is contained in:
parent
265206a6c3
commit
a04f4a3d9a
@ -26,7 +26,7 @@ func Exec(ec *EvalConfig, q string, isFirstPointOnly bool) ([]netstorage.Result,
|
|||||||
defer func() {
|
defer func() {
|
||||||
d := time.Since(startTime)
|
d := time.Since(startTime)
|
||||||
if d >= *logSlowQueryDuration {
|
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)
|
*logSlowQueryDuration, d.Seconds(), ec.Start/1000, ec.End/1000, ec.Step/1000, ec.AuthToken.AccountID, ec.AuthToken.ProjectID, q)
|
||||||
slowQueries.Inc()
|
slowQueries.Inc()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user