Files
ottyl/tickets/007-filterbar-integration.md
T
2026-09-05 12:46:45 +01:00

1.6 KiB

007 — FilterBar query integration

Summary

Wire the parsed filter AST into actual log/timeline queries against the engine, so FilterBar's syntax (not just a naive substring match) drives what's shown in LogPreview and LogTimeline.

Scope

  • Evaluator that walks the AST from 005, resolving regex(...) against log text and metric_name[param] <op> value against bucket data (004), using datetime literals resolved via 006.
  • New/extended EngineQuery::Logs (and Timeline) filter parameter that accepts the compiled filter, evaluated inside the engine's single-owner loop (per the README's "engine is sole owner of the btreemap" architecture — don't evaluate against a copy).
  • sequence/timestamp reserved-metric comparisons map directly to the IngestedLog key fields rather than a declared metric lookup.
  • API layer: accept the raw filter string, parse it (return 4xx on parse error), compile to whatever the engine query needs, send to engine.

Acceptance criteria

  • GET /api/logs?filter=... and the timeline equivalent apply the full filter language, not just substring matching.
  • A filter combining a regex clause and a metric comparison with and/or returns correct results against a seeded log+metric fixture.
  • Malformed filter strings return a 4xx with the parser's error message.

Depends on