You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another example of a Rust WASM filter is the [flb_filter_iis](https://github.com/kenriortega/flb_filter_iis) filter.
132
+
This filter takes the [Internet Information Services (IIS)](https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/configure-logging-in-iis)[w3c logs](https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/configure-logging-in-iis#select-w3c-fields-to-log) (with some custom modifications) and transforms the raw string into a standard Fluent Bit JSON structured record.
This filter approach provides us with several powerful advantages inherent to programming languages.
162
+
For instance, it:
163
+
- Can be extended by adding type conversion to fields such as `sc_bytes, cs_bytes, time_taken`. This is particularly useful when we need to validate our data results.
164
+
- Allows for the use of conditions to apply more descriptive filters, for example, "get only all logs that contain status codes above 4xx or 5xx".
165
+
- Can be used to define a `allow/deny` list using a data structure array or a file to store predefined IP addresses.
166
+
- Makes it possible to call an external resource such as an API or database to enhance our data.
167
+
- Allows all methods to be thoroughly tested and shared as a binary bundle or library.
168
+
These examples can be applied in our demo and can serve as an ideal starting point to create more complex logic, depending on our requirements.
0 commit comments