The filter
operator filters incoming entries that match an expression.
Field | Default | Description |
---|---|---|
id |
filter |
A unique identifier for the operator |
output |
Next in pipeline | The connected operator(s) that will receive all outbound entries |
expr |
required | Incoming entries that match this expression will be dropped |
drop_ratio |
1.0 | The probability a matching entry is dropped (used for sampling). A value of 1.0 will drop 100% of matching entries, while a value of 0.0 will drop 0%. |
- type: filter
expr: '$record.message matches "^LOG: .* END$"'
output: my_output
- type: filter
expr: '$labels.env == "production"'
output: my_output
- type: filter
expr: '$record.message == env("MY_ENV_VARIABLE")'
output: my_output