Parse parses a TraceQL query string and applies AST transformations according to opts. Options specific to metrics queries (e.g. WithSpanOnlyFetch) are ignored here.
(s string, opts ...CompileOption)
| 24 | // Parse parses a TraceQL query string and applies AST transformations according to opts. |
| 25 | // Options specific to metrics queries (e.g. WithSpanOnlyFetch) are ignored here. |
| 26 | func Parse(s string, opts ...CompileOption) (expr *RootExpr, err error) { |
| 27 | cfg := applyCompileOptions(opts...) |
| 28 | return parseInternal(s, cfg.skipTransformations, cfg.allowUnsafeHints) |
| 29 | } |
| 30 | |
| 31 | // ParseNoOptimizations parses a TraceQL query without applying any AST transformations. |
| 32 | // Use for contexts where only hints or query structure are inspected and not executed, like hint extraction, validation, etc. |