7 Filters
This chapter covers
- creating content and attribute-based filtering.
- modifying event content to enrich, structure, and help route events.
- transforming content from logs to metrics.
- rewriting tags to help downstream matching.
- Grepping events to help identify events for filtering.
- Limiting events to prevent backend overloading.
- coding filters using Lua.
In the previous Chapter, we looked at Parsers and the Filter that enables the use of parsers. This chapter looks at the rest of the filters available to us. We will look carefully at filters that can manipulate the tag value, as this is central to how we route logs, metrics, and traces to the different output destinations.
We can see how Filters fit into our logical Fluent Bit architecture:
Figure 7.1 The application of filters we’re going to consider in this chapter is highlighted in our logical architecture.

We can group Filters in the following ways: