Add Boolean param kind that is always present true/false (ticket 018)
MetricPrimitiveKind gains Boolean, serialized as "boolean". A param declared with kind Boolean skips capture-group validation and, instead of being omitted when message_match_regex doesn't match, is present on every log line as true/false based purely on whether the regex matches (case-insensitively or per the regex's own flags). Params.tsx lets you pick boolean as a kind and disables the now-unused capture group input. 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
e6e5bc8f50
commit
a9855de3ad
@@ -33,6 +33,11 @@ pub enum MetricPrimitiveKind {
|
||||
Timestamp,
|
||||
/// On a Value-role param this is derived as elapsed time since the previous event (not parsed from text); otherwise it's a literal i64 millisecond count.
|
||||
Duration,
|
||||
/// A standalone param declared with this kind doesn't require (or use) a capture group: its value is
|
||||
/// simply whether `message_match_regex` matches the line, case-insensitively or per the regex's own
|
||||
/// flags — see `crate::engine::derive_log_params`. Unlike other kinds it's present as `true`/`false`
|
||||
/// on every line rather than omitted when unmatched.
|
||||
Boolean,
|
||||
}
|
||||
|
||||
/// Value type paired with [`crate::index_key::IndexKey`] in the engine's primary index.
|
||||
|
||||
Reference in New Issue
Block a user