|
1 | 1 | --- |
2 | | -description: Use Wasm programs as a filter |
| 2 | +description: Use Wasm programs as a filter. |
3 | 3 | --- |
4 | 4 |
|
5 | | -# Wasm Filter |
| 5 | +# Wasm |
6 | 6 |
|
7 | | -Wasm Filter allows you to modify the incoming records using [Wasm](https://webassembly.org/) technology. |
| 7 | +The _Wasm_ filter lets you modify the incoming records using [Wasm](https://webassembly.org/) technology. |
8 | 8 |
|
9 | | -Due to the necessity to have a flexible filtering mechanism, it is now possible to extend Fluent Bit capabilities by writing custom filters using built Wasm programs and its runtime. A Wasm-based filter takes two steps: |
| 9 | +You can extend Fluent Bit capabilities by writing custom filters using built Wasm programs and its runtime. A Wasm-based filter takes the following steps: |
10 | 10 |
|
11 | | -0. (Optional) Compiled as AOT (Ahead Of Time) objects to optimize Wasm execution pipeline |
12 | | -1. Configure the Filter in the main configuration |
13 | | -2. Prepare a Wasm program that will be used by the Filter |
| 11 | +1. (Optional) Compile Ahead Of Time (AOT) objects to optimize the Wasm execution pipeline. |
| 12 | +1. Configure the filter in the main configuration. |
| 13 | +1. Prepare a Wasm program that will be used by the filter. |
14 | 14 |
|
15 | | -## Configuration Parameters <a id="config"></a> |
| 15 | +## Configuration parameters |
16 | 16 |
|
17 | 17 | The plugin supports the following configuration parameters: |
18 | 18 |
|
19 | 19 | | Key | Description | |
20 | 20 | | :--- | :--- | |
21 | | -| Wasm\_Path | Path to the built Wasm program that will be used. This can be a relative path against the main configuration file. | |
22 | | -| Event\_Format | Define event format to interact with Wasm programs: msgpack or json. Default: json | |
23 | | -| Function\_Name | Wasm function name that will be triggered to do filtering. It's assumed that the function is built inside the Wasm program specified above. | |
24 | | -| Accessible\_Paths | Specify the whitelist of paths to be able to access paths from WASM programs. | |
25 | | -| Wasm\_Heap\_Size | Size of the heap size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit/unit-sizes.md) for allowed values. | |
26 | | -| Wasm\_Stack\_Size | Size of the stack size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit/unit-sizes.md) for allowed values. | |
27 | | - |
28 | | -## Configuration Examples <a id="config_example"></a> |
| 21 | +| `Wasm_Path` | Path to the built Wasm program that will be used. This can be a path relative to the main configuration file. | |
| 22 | +| `Event_Format` | Define event format to interact with Wasm programs: `msgpack` or `json`. Default: `json`. | |
| 23 | +| `Function_Name` | Wasm function name that will be triggered to do filtering. It's assumed that the function is built inside the Wasm program specified previously. | |
| 24 | +| `Accessible_Paths` | Specify the allowlist of paths to be able to access paths from Wasm programs. | |
| 25 | +| `Wasm_Heap_Size` | Size of the heap size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit/unit-sizes.md) for allowed values. | |
| 26 | +| `Wasm_Stack_Size` | Size of the stack size of Wasm execution. Review [unit sizes](../../administration/configuring-fluent-bit/unit-sizes.md) for allowed values. | |
| 27 | + |
| 28 | +## Configuration example |
29 | 29 |
|
30 | 30 | Here is a configuration example. |
31 | 31 |
|
|
0 commit comments