liveBook · Manning

WebAssembly

As explained in Logs and Telemetry

WebAssembly is a portable binary instruction format and execution target for code running in constrained or embedded environments.

WebAssembly (WASM) is a portable binary assembly and execution target for custom logic. In Fluent Bit, it packages discrete local executables as plugins, keeping extensions loosely coupled from the core while preserving Fluent Bit configuration and deployment workflows. section 9.3 section 9.6

WASI provides the controlled boundary through which an assembly communicates with external resources. That boundary grew from browser-oriented security needs: a WASM binary can be deployed and run without a language-specific client runtime, while access beyond the assembly remains constrained. section 9.6

For custom Fluent Bit plugins, WASM offers practical advantages:

  • Use multiple implementation languages, including C, Rust, Python, C#, Go, JavaScript, Java, PHP, and JVM-based languages. section 9.6 section 9.6.1
  • Keep component boundaries robust and separate plugin release cycles from the Fluent Bit project. section 9.6.1
  • Distribute a binary artifact without disclosing its source, supporting closed-source commercial plugins. section 9.6.1
  • Start with a smaller footprint than containers and benefit from security controls that make environmental access harder for third-party plugins. section 9.6 section 9.6.1

Event transformation plugin

A WASM plugin can manipulate a Fluent Bit event into a structure that Fluent Bit carries with an application. The assembly may be released and updated on its own schedule rather than waiting for a Fluent Bit release. section 9.6.1

Choose WASM when language freedom, isolation, and independently shipped binary plugins outweigh development overhead. Configuration is no more complex than a Go plugin, but defining assemblies and debugging them adds a meaningful learning curve. section 9.6 section 9.6.1

Treat WASM as a trade-off rather than a universal performance choice. Its abstraction layers can add the greatest overhead among Fluent Bit extension approaches; a Python-based WASM plugin on a high-volume pipeline can therefore carry significant performance implications. section 9.6.2

Security also limits capability. The same controlled model that protects environments can make network access through HTTP or TCP interfaces difficult, and code wrapped in an assembly can be harder to debug. C remains necessary when a plugin must be incorporated into a standard Fluent Bit deployment. section 9.6.2 section 9.3

How Logs and Telemetry covers it

How deep it goes
Explains plugin boundaries, WASI access controls, benefits, and operational drawbacks without detailing assembly implementation.
Examples
Uses a Fluent Bit event-transformation plugin and a Python WASM plugin in a high-volume pipeline as operational examples.
What it assumes
Requires mastering assembly definition, building, and debugging, while leaving prior-language prerequisites unspecified.
What you can do after
Apply it via Fluent Bit to package and independently release custom plugin logic while weighing security and performance constraints.
How it connects
Connects WebAssembly to WASI, Fluent Bit plugins, C, Go, Lua, containers, and gRPC and Protobuf APIs.

Also explained in

Compare how 5 books explain WebAssembly →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Logs and Telemetry. The section links point to the parts of the book it draws on.