feat(querier): rfc0018.4 green — event_name DSL filter - #267
Conversation
Add `event_name` to the logs DSL, mirroring the existing `scope` bare field: the `Field::EventName` variant (a string-operand field), lexed/parsed, structured-IR mapped, rendered, and compiled to the RFC 0005 `event_name` column. The column already existed (RFC 0005 §3.2); only the query surface was missing it. Greens RFC0018.4: `tests/rfc0018_otlp_compliance.rs` now runs an `event_name == "checkout"` query end-to-end via `Querier::run_query` and asserts only the two matching rows return (login + absent excluded); H6 holds (the returned `QueryResult` is Ourios-owned). The full querier suite (74+ tests) still passes — the new `Field` variant broke nothing. RFC 0018 stays `red` overall (1 of 6 §5 scenarios green). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 15 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds event_name as a first-class field in the ourios-querier logs DSL (RFC0018.4), wiring it through IR → parse/structured surfaces → display → compilation to the RFC0005 event_name column, and validating it end-to-end with a now-green acceptance test.
Changes:
- Introduces
Field::EventNamein the DSL IR and marks it as string-compatible for string calls. - Teaches both the string DSL parser and the structured (JSON) surface to recognize
event_name, and ensures canonical rendering outputsevent_name. - Extends query compilation to map
event_nameto the RFC0005event_namecolumn and adds a green RFC0018.4 integration test proving filtering works against a real Parquet store.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/ourios-querier/tests/rfc0018_otlp_compliance.rs | Converts RFC0018.4 from ignored stub to a tokio end-to-end test asserting event_name filtering returns exactly the matching rows. |
| crates/ourios-querier/src/dsl/structured.rs | Adds "event_name" → Field::EventName mapping for the structured query surface. |
| crates/ourios-querier/src/dsl/parse.rs | Adds event_name to bare-field parsing and leak-free field naming for errors. |
| crates/ourios-querier/src/dsl/ir.rs | Adds Field::EventName and includes it in string-operand eligibility. |
| crates/ourios-querier/src/dsl/display.rs | Ensures canonical serialization prints event_name. |
| crates/ourios-querier/src/compile.rs | Maps Field::EventName to columns::EVENT_NAME, treats it as a text field, and enables string calls on it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot: is_text_field listed service/resource/attr, but its only caller is on the dedicated-column path in column_comparison, which compile_comparison never reaches for those fields (they're intercepted by attr_match first). Those arms were dead; drop them so the code matches the doc. No runtime change (single caller, attr fields never arrive here). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
RFC 0018 green (1/6) —
event_nameas a first-class DSL filter (RFC0018.4)Adds
event_nameto the logs DSL, mirroring the existingscopebare field exactly:Field::EventNamevariant (string-operand) indsl/ir.rsdsl/parse.rs), structured-IR mapped (dsl/structured.rs), rendered (dsl/display.rs)event_namecolumn (compile.rs:column_of,is_text_field,field_name,string_call_column)The
event_namecolumn already existed (RFC 0005 §3.2) — only the query surface was missing it (audit gap #3).Verification
event_name == "checkout"runs end-to-end viaQuerier::run_query→ exactly the 2 matching rows (login + absent excluded); H6 holds (QueryResultis Ourios-owned).ourios-queriersuite: 74+ tests pass, the newFieldvariant broke nothing (round-trip proptests, display, structured parse all green).cargo fmt --check,cargo clippy --all-targetsclean.RFC 0018 stays
redoverall — this greens 1 of 6 §5 scenarios. Remaining: .1/.2 (scope fields), .3 (retryable errors), .5 (non-finite doubles), .6 (severity preserve).🤖 Generated with Claude Code