For the complete documentation index, see llms.txt. This page is also available as Markdown.

Wasm

Use Wasm programs as a filter.

Supported event types: logs

The Wasm filter lets you modify the incoming records using Wasm technology.

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:

  1. (Optional) Compile Ahead Of Time (AOT) objects to optimize the Wasm execution pipeline.

  2. Configure the filter in the main configuration.

  3. Prepare a Wasm program that will be used by the filter.

Configuration parameters

The plugin supports the following configuration parameters:

Key
Description

accessible_paths

Specify the allowlist of paths to be able to access paths from Wasm programs. Default: . (current directory).

event_format

Define event format to interact with Wasm programs: msgpack or json. Default: json.

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.

wasm_heap_size

Size of the heap size of Wasm execution. Review unit sizes for allowed values.

wasm_path

Path to the built Wasm program that will be used. This can be a path relative to the main configuration file.

wasm_stack_size

Size of the stack size of Wasm execution. Review unit sizes for allowed values.

Configuration example

Here is a configuration example.

Last updated

Was this helpful?