Filters events based on a condition, either passing or dropping matches.

Filter🔗

Filters events based on a condition, either passing or dropping matches.

Configuration🔗

FieldTypeRequiredDefaultDescription
inputs[string]yesList of upstream component names to receive events from.
conditionFilterConditionyesThe filter condition to evaluate against each event.
  kindFilterTypenoType of filter operation (drop or pass).
  sourcestringnoField or path to evaluate against.
  patternstringnoPattern or value to match.
  logbooleannoWhether to log filter decisions.
error_policyErrorPolicynodrop_on_errorPolicy for handling events that cause errors during filtering.

Telemetry🔗

This component emits the following standard telemetry metrics and events.

Metrics🔗

NameTypeDescription
component_received_events_totalCounterTotal number of events received from upstream.
component_sent_events_totalCounterTotal number of events sent downstream.
component_errors_totalCounterTotal number of errors encountered during processing.

Events🔗

NameDescription
ComponentErrorEmitted when an error occurs during component execution.
ComponentEventsDroppedEmitted when events are intentionally or unintentionally dropped.

Example🔗

transforms:
  my_filter:
    type: filter
    inputs: # required