Go is a native-binary language used to build custom Fluent Bit extensions when standard plugins cannot handle specialized authentication, encryption, serialization, compression, or generated gRPC/Protobuf APIs. It preserves Fluent Bit integration while keeping extension logic separate from the core binary. section 9.3 section 9.5
Go plugins use Fluent Bit’s Go bindings and Goproxy interfaces. At the described interface level, Go exposes input and output plugin types; filter implementations are not exposed through Goproxy, although filter work draws on input and output principles. section 9.5 section 10.0
cgo connects Go functions to C headers, wraps memory handling across the language boundary, and can generate shared-object (.so) binaries. Fluent Bit loads these binaries at startup and can reload them through hot reload, allowing plugin updates without a full Fluent Bit restart. section 10.4
Choose Go plugins when their operational trade-offs fit the extension:
- Keep proprietary or organization-specific logic outside the Fluent Bit core and control internal development, testing, and release practices. section 9.5.1 section 9.7
- Retain native-binary performance while relying on Go runtime memory management and standard C interoperability. section 9.5.1
- Avoid recompiling all of Fluent Bit and use clearer API touchpoints than a core C plugin. section 10.2
- Plan separate builds for each target OS and CPU architecture when supporting multiple platforms. section 10.4
Table 9.1 Decision matrix to help determine the most suitable plugin technology
|
Factor
|
C (part of Fluent Bit)
|
Go
|
WASM
|
|---|---|---|---|
|
Code is kept proprietary (for considerations such as protecting intellectual property).
|
N
|
Y
|
Y
|
|
N
|
Y
|
Y
|
|
|
The change and release process is controlled by the Fluent Bit community.
|
Y
|
N
|
N
|
|
Build and development needs to work with the existing build process.
|
Y
|
N
|
N
|
|
You can use your own development and testing standards and tools.
|
N
|
Y
|
Y
|
|
Code reuse and behavior consistency are maximized.
|
Y
|
-
|
-
|
|
The plugin supports niche use cases in which extensions must be implemented without forking the Fluent Bit core.
|
N
|
Y
|
Y
|
|
The plugin offers value to a wider community, and the value and cost of maintaining the code is shared within the community.
|
Y
|
-
|
-
|
|
The language has inbuilt memory management, eliminating the work of managing memory explicitly and the associated risks.
|
N
|
Y
|
Y
|
|
The plugin benefits from language-native memory management, allowing it to be highly optimized.
|
Y
|
N
|
N
|
|
You have increased programming-language freedom (such as Rust, JavaScript, or Java).
|
N
|
N
|
Y
|
|
Abstraction overheads must be minimal.
|
Y
|
Y
|
N
|
Compare C, Go, and WASM against ownership, licensing, build-process, memory-management, and niche-use-case requirements before selecting an extension strategy. section 9.7










