Remove ticket 044 (implemented: ottyl_fmt param + ottyl_seq/ottyl_ts rename)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a7147f47a0
commit
70d98562d1
@@ -1,48 +0,0 @@
|
|||||||
# 044 — Add `ottyl_fmt` reserved param; rename `sequence`/`timestamp` to `ottyl_seq`/`ottyl_ts`
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
|
|
||||||
`sequence` and `timestamp` are handled as reserved query metric names in the
|
|
||||||
filter grammar (`src/filter_parser.rs`, e.g. `parses_reserved_metric_sequence`,
|
|
||||||
`parses_reserved_metric_timestamp_as_raw_value`) and in alert evaluation
|
|
||||||
(`src/alerts.rs:199,208`, restricted per the comment at `src/alerts.rs:3` to
|
|
||||||
`regex/sequence/timestamp/json[field]`), backed by `LogLine { sequence,
|
|
||||||
timestamp_ms }` in `src/dto.rs:11-12`. These names collide with ordinary
|
|
||||||
user-declared params and don't signal that they're ottyl-owned. Separately,
|
|
||||||
there is currently no reserved param exposing which format
|
|
||||||
(`auto_declare_params`/`auto_derived`, `src/engine.rs` and `src/logfmt.rs`,
|
|
||||||
added in "Auto derived format") was used to parse a given log line — that
|
|
||||||
information is computed but not surfaced as a queryable/orderable param.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
- Add a new reserved param `ottyl_fmt`: a text-enum value recording which
|
|
||||||
format a line was derived with (e.g. auto-detected key=value/logfmt vs.
|
|
||||||
JSON vs. plain/none), populated wherever `auto_declare_params`/format
|
|
||||||
detection currently runs (`src/engine.rs`, `src/logfmt.rs`).
|
|
||||||
- Rename the reserved metric names `sequence` → `ottyl_seq` and
|
|
||||||
`timestamp` → `ottyl_ts` everywhere they're recognized: filter grammar
|
|
||||||
(`src/filter_parser.rs`), alert query restriction and evaluation
|
|
||||||
(`src/alerts.rs`), and any webapp references to these literal names
|
|
||||||
(`webapp/src/lib/api.ts`, `webapp/src/components/LogPreview.tsx`).
|
|
||||||
- Decide and implement backward compatibility: either accept both old and
|
|
||||||
new names for one release, or treat this as a breaking rename (update
|
|
||||||
fixtures/docs accordingly) — call this out explicitly in the PR.
|
|
||||||
- Update any docs/help text (e.g. regex cheat sheet, param declaration UI)
|
|
||||||
that reference `sequence`/`timestamp` by name.
|
|
||||||
|
|
||||||
## Acceptance criteria
|
|
||||||
|
|
||||||
- Filters, alert queries, and metric declarations recognize `ottyl_seq`
|
|
||||||
and `ottyl_ts`; the old bare names either error clearly or continue to
|
|
||||||
work per the compatibility decision above, but are no longer the
|
|
||||||
documented names.
|
|
||||||
- `ottyl_fmt` is queryable/filterable like other reserved params and its
|
|
||||||
value reflects the actual detected format for a given log line
|
|
||||||
(verified by a seeded fixture with mixed-format lines).
|
|
||||||
- Existing tests referencing `sequence`/`timestamp` reserved metrics are
|
|
||||||
updated and pass.
|
|
||||||
|
|
||||||
## Depends on
|
|
||||||
|
|
||||||
None.
|
|
||||||
Reference in New Issue
Block a user