1.5 KiB
1.5 KiB
001 — Param declarations
Summary
Implement the ParamDeclaration slice of the primary index: users can declare how a
named parameter is derived from a log line (e.g. deriving a timestamp different from
the ingestion timestamp, or a log level), and the engine stores/serves those
declarations.
Scope
IndexKey::ParamDeclaration { name }and a matchingDataValuevariant for the declaration body (a regex against the raw log text, plus how the capture maps to aMetricPrimitive— reuseRegexToMetricPrimitiveMatcher/MetricPrimitiveKindfromdata_value.rs, which already exist but are unused).- Engine message(s) to add/list/remove a param declaration.
- Validate declared regexes at declaration time (reject invalid regex / unknown primitive kind up front rather than failing per-log later).
- No derivation/backfill against existing logs yet — that's 002 / 003, since metrics are what actually get indexed into buckets. This ticket is just the declaration storage + validation.
Acceptance criteria
- Declaring a param with a valid regex + capture group succeeds and is retrievable.
- Declaring a param with an invalid regex or referencing a non-existent capture group is rejected with a clear error, not silently stored.
- Declarations sit in their own contiguous range of the BTreeMap
(
ParamDeclarationbetweenLogParamSplitandParamMetricSplit), per theIndexKeyordering in the README.
Depends on
None — this is foundational.