Open weltenwort opened 4 years ago
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)
@weltenwort I think both regexp and wildcard queries are needed.
@tvernum @markharwood what do you think? This is a related to searching over a long keyword field. This is for the Log Threshold
alert type that looks like:
Which operators to implement exactly? Regexp? Wildcard? both?
I think we should implement both, implementation of both is relatively simple from our side, and we need both to fully satisfy the range of options users need. Whilst regex alone can probably achieve the wildcard intent, wildcards are definitely easier to write / use and we'd be ensuring the ES query type is optimised for the use case (not that users should necessarily know about that - although the enhanced docs will make that clear for the more advanced users).
@DanRoscigno For the UI based operator name, do you think matches regex
and matches wildcard
would work, and convey semantics clearly?
@Kerry350 I think there needs to be a tooltip hint as I do not think the difference between regexp
(I am trying to include the p
as that is how it is documented) is clear. I would point to the docs with the tooltips unless the two operators can be described in a sentence. Probably https://www.elastic.co/guide/en/elasticsearch/reference/current/regexp-syntax.html
and https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html
I edited the ACs to require both operators. As for the documentation, how about we add a one-sentence explanation with a link to the ES docs inside the operator selection popover?
(codesandbox for experimentation)
Looks good to me!
Thanks @weltenwort for creating this issue. Actionable Observability would love to discuss this with you as it could be of interest for other rule types. cc @vinaychandrasekhar @simianhacker
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)
Any updates?
Summary
The user should be able to configure log entry rate alert conditions for
keyword
orwildcard
fields that perform partial matches on the field values.Rationale
The
keyword
andwildcard
field types are commonly used for labels and categorical data, but their query semantics are not amenable tomatch
ormatch_phrase
queries, because they are intentionally not analyzed upon indexing. Partial matches against the values would often still be useful if the field values have a substructure that the user wants to query for, such as paths or other hierarchical naming schemes.Acceptance criteria
:warning: discussions are ongoing below
keyword
orwildcard
in the log entry rate alert creation form an operator backed by thewildcard
query clause is available.keyword
orwildcard
in the log entry rate alert creation form an operator backed by theregexp
query clause is available.