Sql Expressions: (Chore) Dedicated logger for expr.sql, and pass context (#109549)

This commit is contained in:
Kyle Brandt
2025-08-13 11:20:14 -04:00
committed by GitHub
parent 789a61230d
commit 466aa70179
17 changed files with 56 additions and 50 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
package expr
import (
"context"
"fmt"
"strings"
@@ -44,6 +45,7 @@ func NewExpressionQueryReader(features featuremgmt.FeatureToggles) *ExpressionQu
// nolint:gocyclo
func (h *ExpressionQueryReader) ReadQuery(
ctx context.Context,
// Properties that have been parsed off the same node
common data.DataQuery,
// An iterator with context for the full node (include common values)
@@ -135,7 +137,7 @@ func (h *ExpressionQueryReader) ReadQuery(
eq.Properties = q
// TODO: Cascade limit from Grafana config in this (new Expression Parser) branch of the code
cellLimit := 0 // zero means no limit
eq.Command, err = NewSQLCommand(common.RefID, q.Format, q.Expression, int64(cellLimit), 0, 0)
eq.Command, err = NewSQLCommand(ctx, common.RefID, q.Format, q.Expression, int64(cellLimit), 0, 0)
}
case QueryTypeThreshold: