28 lines
965 B
Markdown
28 lines
965 B
Markdown
# 012 — Metrics UI
|
|
|
|
## Summary
|
|
|
|
Replace the current "Coming Soon" Metrics placeholder with a real component: declare
|
|
metrics via the metric language, and view their derived values.
|
|
|
|
## Scope
|
|
|
|
- A form/editor for declaring a metric (regex + param matchers) that calls
|
|
`POST /api/metrics` ([004](004-metrics-api.md)), with inline validation errors
|
|
surfaced from the API's 4xx responses.
|
|
- List of currently-declared metrics with their labels.
|
|
- A view of a selected metric's bucket values over the active time range (reuse the
|
|
time-range plumbing already in `App.tsx`/`LogTimeline`).
|
|
|
|
## Acceptance criteria
|
|
|
|
- Declaring a metric in the UI immediately reflects newly-matching logs (existing
|
|
and new) in the metric's value view, per the backfill behavior from
|
|
[003](003-metric-bucket-derivation.md).
|
|
- Invalid metric definitions show the backend's validation error instead of failing
|
|
silently.
|
|
|
|
## Depends on
|
|
|
|
- [004 — Metrics API](004-metrics-api.md)
|