MCPcopy
hub / github.com/grafana/tempo / IsEmptyQuery

Function IsEmptyQuery

pkg/traceql/lenient_extract.go:74–77  ·  view source on GitHub ↗

IsEmptyQuery returns true if the query is empty or a match-all (e.g. "{}", "{ }", "{ true }").

(query string)

Source from the content-addressed store, hash-verified

72
73// IsEmptyQuery returns true if the query is empty or a match-all (e.g. "{}", "{ }", "{ true }").
74func IsEmptyQuery(query string) bool {
75 query = strings.ReplaceAll(query, " ", "")
76 return query == "" || query == "{}" || query == "{true}"
77}
78
79// NormalizeQuery parses a query string using the lenient parser and returns
80// a normalized string representation. Used for cache key generation.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected