-
Notifications
You must be signed in to change notification settings - Fork 3
Filtering
Each log record checked with a set of filters. If it pass all checks then it passed to the writer of the sink. There are filters described below maybe set for the sink.
The sink can accept arbitrary number of filters. Conditions for different filters chained with logical AND.
Filter passed if the key
exists among the keys of the record.
All other keys don't matter.
Filter passed if the key
don't exists among the keys of the record.
Filter passed if the key
has value equal to any of values from value
list of the function.
Filter passed if the key
not exists in the record.
Filter passed if the key
has any value not equal to any values from value
list of the function.
Filter passed if the key
not exists in the record.
Filter passed if the value for the key
is greater or equal than from
or greater or equal than to
.
Filter passed if the key
not exists in the record.
Each of supported types has its own WithRange. For example:
-
WithRangeInt64
for int64 -
WithRangeFloat64
for float64 -
WithRangeString
for string
Filter passed if the value for the key
is lesser than from
or greater than to
.
Filter passed if the key
not exists in the record.
As for WithRange filters each of supported types has its own WithoutRange. For example:
-
WithoutRangeInt64
for int64 -
WithoutRangeFloat64
for float64 -
WithoutRangeString
for string
It allows you set custom filter. Custom filter is type with method Check
as defined by Filter
inferface.
So this way you can set arbitrary number of custom conditions which take into account keys and values.
See Advanced topics: Custom Filters
about details how to define and apply custom filters.
There are no contemporary Without
function for custom filters, only With
.
So filter is passed when the function returns true
.