Filters events based on a condition, either passing or dropping matches.
Filter🔗
Filters events based on a condition, either passing or dropping matches.
Configuration🔗
| Field | Type | Required | Default | Description |
inputs | [string] | yes | — | List of upstream component names to receive events from. |
condition | FilterCondition | yes | — | The filter condition to evaluate against each event. |
kind | FilterType | no | — | Type of filter operation (drop or pass). |
source | string | no | — | Field or path to evaluate against. |
pattern | string | no | — | Pattern or value to match. |
log | boolean | no | — | Whether to log filter decisions. |
error_policy | ErrorPolicy | no | drop_on_error | Policy for handling events that cause errors during filtering. |
Telemetry🔗
This component emits the following standard telemetry metrics and events.
Metrics🔗
| Name | Type | Description |
component_received_events_total | Counter | Total number of events received from upstream. |
component_sent_events_total | Counter | Total number of events sent downstream. |
component_errors_total | Counter | Total number of errors encountered during processing. |
Events🔗
| Name | Description |
ComponentError | Emitted when an error occurs during component execution. |
ComponentEventsDropped | Emitted when events are intentionally or unintentionally dropped. |
Example🔗
transforms:
my_filter:
type: filter
inputs: # required