Drop
Synopsis
Conditionally stops processing of a document by dropping it from the pipeline.
Schema
drop:
- if: <script>
- description: <text>
- ignore_failure: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
Configuration
Field | Required | Default | Description |
---|---|---|---|
if | N | - | Condition that determines whether to drop the document |
description | N | - | Explanatory note |
ignore_failure | N | false | If true , condition evaluation errors are ignored |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
This processor is particularly useful for filtering out unwanted documents based on their content or metadata without raising exceptions.
Common uses are filtering debug logs, excluding health checks, and dropping internal traffic.
Once dropped, a document cannot be recovered by the subsequent processors. Use caution with complex conditions to avoid accidentally dropping important documents.
Examples
Basic Drop
Dropping documents with a specific packet count... |
|
removes them from the pipeline: |
|
Multiple Conditions
Specifying multiple criteria... |
|
filters out documents that meet the combined conditions: |
|
Complex Filtering
Using complex conditions... |
|
filters out those traffic patterns: |
|
Error Handling
Handling evaluation errors gracefully... |
|
continues the process on errors: |
|