This class help to deal with Line Filters
The line filter expression does a distributed grep
over the aggregated logs from the matching log streams. It searches the contents of the log line, discarding those lines that do not match the case-sensitive expression.
Each line filter expression has a filter operator followed by text or a regular expression. These filter operators are supported:
|=
: Log line contains string!=
: Log line does not contain string|~
: Log line contains a match to the regular expression!~
: Log line does not contain a match to the regular expression
type LineFilterOperator = "lineContains" | "lineDoesNotContain" | "lineContainsRegexMatch" | "lineDoesNotContainRegexMatch";
class LineFilters extends Map<LineFilterOperator, string[]> {}
Note
The LineFilters class extend from JavaScript Map Object.
Initializes a new instance of the LineFilters
class with an optional LogQL query string.
Available init
types are:
string
- Create an instance ofLineFilters
given a LogQL query to parse.LineFilters
- Create an instance ofLineFilters
based on anotherLineFilters
class.
Register a new line filter expression.
Operator can be one of lineContains
, lineDoesNotContain
, lineContainsRegexMatch
, lineDoesNotContainRegexMatch
.
Get each lineContains expressions.
Get each lineDoesNotContain expressions.
Get each lineContainsRegexMatch expressions.
Get each lineDoesNotContainRegexMatch expressions.
Converts the LineFilters
instance into a partial LogQL query string.
Returns a string representing the partial LogQL query.