~/talk

Getting More Out of Lua in Fluent Bit

Talkat FluentCon North America 2021 · on Tuesday, 2021-10-12· [observability]
links:none on file
slides:none on file

Explains exact Lua filter mechanics in Fluent Bit: the three function arguments (tag, timestamp, record), the four return codes (-1 drop, 0 nop, 1 replace ts+record, 2 replace record), and concrete fixes for timestamp precision using time_as_table (sec/nsec), padding fractional nsec, and formatting UTC human-readable timestamps. Shows how to inject a collector_timestamp, why unparsed input forces Fluent Bit to generate processing timestamps, recommends local variables over globals, separate Lua files per filter, and notes Fluent Bit embeds LuaJIT (Lua 5.1) so newer Lua features aren’t available.

AI-written summary · about

  1. 0:00Start
  2. 1:09Motivation
  3. 3:01Basics
  4. 5:24Example: Replace record timestamp
  5. 8:22Example: Generate collector timestamp
  6. 18:45Tips
  7. 19:01Tip: Truthiness
  8. 19:54Tip: Minimize main function contents
  9. 21:25Tip: Minimize file contents
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.