Commit 19f3ec48 by Marcus Efraimsson Committed by GitHub

MySQL, Postgres, MSSQL: Only debug log when in development (#19239)

Found some additional debug statements in relation to #19049 that 
can cause memory issues.

Ref #19049
parent d95318b3
...@@ -12,6 +12,8 @@ import ( ...@@ -12,6 +12,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/tsdb" "github.com/grafana/grafana/pkg/tsdb"
...@@ -418,9 +420,11 @@ func (e *sqlQueryEndpoint) transformToTimeSeries(query *tsdb.Query, rows *core.R ...@@ -418,9 +420,11 @@ func (e *sqlQueryEndpoint) transformToTimeSeries(query *tsdb.Query, rows *core.R
series.Points = append(series.Points, tsdb.TimePoint{value, null.FloatFrom(timestamp)}) series.Points = append(series.Points, tsdb.TimePoint{value, null.FloatFrom(timestamp)})
if setting.Env == setting.DEV {
e.log.Debug("Rows", "metric", metric, "time", timestamp, "value", value) e.log.Debug("Rows", "metric", metric, "time", timestamp, "value", value)
} }
} }
}
for elem := seriesByQueryOrder.Front(); elem != nil; elem = elem.Next() { for elem := seriesByQueryOrder.Front(); elem != nil; elem = elem.Next() {
key := elem.Value.(string) key := elem.Value.(string)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment