mirror of
https://github.com/SigNoz/signoz.git
synced 2026-10-07 02:30:42 +01:00
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
- Replace the search() stub: the logs condition builder fans a case-insensitive
match of the term across every searchable column (log columns, body/body_v2,
attribute + resource maps).
- Grammar: searchCall takes a valueList (parser regenerated), so the scoped form
search('term', body, resource) parses and narrows the fan-out to those contexts.
- The visitor emits FilterOperatorSearch and flags the statement scan-heavy; the
statement builder attaches a CostGuard the querier enforces via EXPLAIN ESTIMATE
against a per-shard budget, cumulative across buckets on the window-list path.
- body_v2 gets its own, lower budget (search_max_scan_rows_json_body): toString()
rebuilds every document and no skip index prunes.
- Logs-only: other signals reject search().
- Unit tests for the per-context fan-out SQL and both budgets; integration suites
run the same matrix over the legacy body and over body_v2.
19 lines
752 B
Go
19 lines
752 B
Go
package querybuilder
|
|
|
|
const (
|
|
TrueConditionLiteral = "true"
|
|
SkipConditionLiteral = "__skip__"
|
|
ErrorConditionLiteral = "__skip_because_of_error__"
|
|
|
|
// BodyFullTextSearchDefaultWarning is emitted when a full-text search or "body" searches are hit
|
|
// with New JSON Body enhancements.
|
|
BodyFullTextSearchDefaultWarning = "Full text searches default to `body.message:string`. Use `body.<key>` to search a different field inside body"
|
|
|
|
// SearchWarning is emitted on every search() call — it scans all fields.
|
|
SearchWarning = "search() runs across all fields and can be slow and expensive. Prefer a specific field, e.g. `<context>.<field_key>:<type>`"
|
|
)
|
|
|
|
var (
|
|
SkippableConditionLiterals = []string{SkipConditionLiteral, ErrorConditionLiteral}
|
|
)
|